Mercurial > pub > Impl
diff Lib/IMPL/DOM/Transform/PostToDOM.pm @ 49:16ada169ca75
migrating to the Eclipse IDE
author | wizard@linux-odin.local |
---|---|
date | Fri, 26 Feb 2010 10:49:21 +0300 |
parents | 94d47b388442 |
children | 2d1c3f713280 |
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Transform/PostToDOM.pm Fri Feb 26 01:43:42 2010 +0300 +++ b/Lib/IMPL/DOM/Transform/PostToDOM.pm Fri Feb 26 10:49:21 2010 +0300 @@ -1,36 +1,36 @@ -package IMPL::DOM::Post2DOM; -use strict; -use warnings; - -use IMPL::DOM::Navigator; -use IMPL::Class::Property; - -use base qw(IMPL::Transform); - -BEGIN { - public property Navigator => prop_get | owner_set; -} - -our %CTOR = ( - 'IMPL::Transform' => sub { - return ( - HASH => \&TransfromPostData - ); - } -); - -sub TransformPostData { - my ($this,$data) = @_; - - my $navi = $this->Navigator; - - while (my ($key,$value) = each %$data) { - my $node = $navi->Navigate($key); - $node->nodeValue($value); - } - - return $navi->Document; -} - - -1; +package IMPL::DOM::Post2DOM; +use strict; +use warnings; + +use IMPL::DOM::Navigator; +use IMPL::Class::Property; + +use base qw(IMPL::Transform); + +BEGIN { + public property Navigator => prop_get | owner_set; +} + +our %CTOR = ( + 'IMPL::Transform' => sub { + return ( + HASH => \&TransfromPostData + ); + } +); + +sub TransformPostData { + my ($this,$data) = @_; + + my $navi = $this->Navigator; + + while (my ($key,$value) = each %$data) { + my $node = $navi->Navigate($key); + $node->nodeValue($value); + } + + return $navi->Document; +} + + +1;