comparison Lib/IMPL/DOM/Document.pm @ 37:c2e7f7c96bcd

performance improvements, DOM reworked (a little)
author Sergey
date Mon, 23 Nov 2009 00:59:06 +0300
parents 1828103371d0
children 16ada169ca75
comparison
equal deleted inserted replaced
36:1828103371d0 37:c2e7f7c96bcd
3 use warnings; 3 use warnings;
4 4
5 use base qw(IMPL::DOM::Node); 5 use base qw(IMPL::DOM::Node);
6 6
7 __PACKAGE__->PassThroughArgs; 7 __PACKAGE__->PassThroughArgs;
8
9 sub document {
10 return $_[0];
11 }
8 12
9 sub Create { 13 sub Create {
10 my ($this,$nodeName,$class,$refProps) = @_; 14 my ($this,$nodeName,$class,$refProps) = @_;
11 15
12 $refProps ||= {}; 16 $refProps ||= {};
13 17
14 delete $refProps->{nodeName}; 18 delete $refProps->{nodeName};
15 19
16 return $class->new( 20 return $class->new(
17 nodeName => $nodeName, 21 nodeName => $nodeName,
22 document => $this,
18 %$refProps 23 %$refProps
19 ); 24 );
20 } 25 }
21 26
22 { 27 {