diff Lib/IMPL/Web/TT/Collection.pm @ 107:0e72ad99eef7

Updated Web::TT
author wizard
date Thu, 13 May 2010 03:46:29 +0400
parents
children ddf0f037d460
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Web/TT/Collection.pm	Thu May 13 03:46:29 2010 +0400
@@ -0,0 +1,23 @@
+package IMPL::Web::TT::Collection;
+use strict;
+
+use base qw(IMPL::DOM::Node);
+
+__PACKAGE__->PassThroughArgs;
+
+our $AUTOLOAD;
+sub AUTOLOAD {
+	my $this = shift;
+	my ($method) = ($AUTOLOAD =~ /(\w+)$/);
+	
+	my @result = $this->selectNodes($method);
+	
+	return $result[0] if @result;
+	return;
+}
+
+sub as_list {
+	$_[0]->childNodes;
+}
+
+1;
\ No newline at end of file