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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
107
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
1 package IMPL::Web::TT::Collection;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
2 use strict;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
3
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
4 use base qw(IMPL::DOM::Node);
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
5
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
6 __PACKAGE__->PassThroughArgs;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
7
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
8 our $AUTOLOAD;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
9 sub AUTOLOAD {
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
10 my $this = shift;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
11 my ($method) = ($AUTOLOAD =~ /(\w+)$/);
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
12
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
13 my @result = $this->selectNodes($method);
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
14
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
15 return $result[0] if @result;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
16 return;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
17 }
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
18
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
19 sub as_list {
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
20 $_[0]->childNodes;
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
21 }
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
22
0e72ad99eef7 Updated Web::TT
wizard
parents:
diff changeset
23 1;