Mercurial > pub > Impl
view Lib/IMPL/DOM/Transform/PostToDOM.pm @ 47:a9b70d836b28
Web::Application development (request controller)
Security development
author | Sergey |
---|---|
date | Tue, 23 Feb 2010 22:57:16 +0300 |
parents | 94d47b388442 |
children | 16ada169ca75 |
line wrap: on
line source
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;