Mercurial > pub > Impl
annotate Lib/IMPL/Web/TT/Collection.pm @ 108:c6fb6964de4c
Removed absolute modules
Updated DOM model, selectNodes can now select a complex path
Web DOM model release candidate
author | wizard |
---|---|
date | Fri, 14 May 2010 16:06:06 +0400 |
parents | 0e72ad99eef7 |
children | ddf0f037d460 |
rev | line source |
---|---|
107 | 1 package IMPL::Web::TT::Collection; |
2 use strict; | |
3 | |
4 use base qw(IMPL::DOM::Node); | |
5 | |
6 __PACKAGE__->PassThroughArgs; | |
7 | |
8 our $AUTOLOAD; | |
9 sub AUTOLOAD { | |
10 my $this = shift; | |
11 my ($method) = ($AUTOLOAD =~ /(\w+)$/); | |
12 | |
13 my @result = $this->selectNodes($method); | |
14 | |
15 return $result[0] if @result; | |
16 return; | |
17 } | |
18 | |
19 sub as_list { | |
20 $_[0]->childNodes; | |
21 } | |
22 | |
23 1; |