diff Lib/IMPL/DOM/Transform/PostToDOM.pm @ 235:a4d9126edcbb

code cleaning
author sergey
date Fri, 12 Oct 2012 02:08:51 +0400
parents 4d0e1962161c
children
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Transform/PostToDOM.pm	Thu Oct 11 20:11:45 2012 +0400
+++ b/Lib/IMPL/DOM/Transform/PostToDOM.pm	Fri Oct 12 02:08:51 2012 +0400
@@ -2,28 +2,28 @@
 use strict;
 use warnings;
 
-use IMPL::DOM::Navigator::Builder;
-use IMPL::Class::Property;
-
-use parent qw(IMPL::Transform);
-
-BEGIN {
-    public property documentClass => prop_get | owner_set;
-    public property documentSchema => prop_get | owner_set;
-    public property prefix => prop_get | owner_set;
-    private property _navi => prop_all;
-    public property Errors => prop_all | prop_list;
-    private property _schema => prop_all;
-}
-
-our %CTOR = (
-    'IMPL::Transform' => sub {
-        -plain => \&TransformPlain,
-        HASH => \&TransformContainer,
-        CGI => \&TransformCGI,
-        CGIWrapper => \&TransformCGI
-    }
-);
+use IMPL::Const qw(:prop);
+use IMPL::declare {
+    require => {
+        Builder => 'IMPL::DOM::Navigator::Builder' 
+    },
+    base => [
+        'IMPL::Transform' => sub {
+            -plain => \&TransformPlain,
+            HASH => \&TransformContainer,
+            CGI => \&TransformCGI,
+            CGIWrapper => \&TransformCGI
+        } 
+    ],
+    props => [
+        documentClass => PROP_RO,
+        documentSchema => PROP_RO,
+        prefix => PROP_RO,
+        _navi => PROP_RW,
+        errors => PROP_RW | PROP_LIST,
+        _schema => PROP_RW
+    ]
+};
 
 sub CTOR {
     my ($this,$docClass,$docSchema,$prefix) = @_;
@@ -73,6 +73,7 @@
     my $data={};
     
     my $prefix = $this->prefix;
+    my $delim = $this->delimiter;
     
     foreach my $param (grep index($_,$prefix) >= 0 , $query->param()) {
         length (my $value = $query->param($param)) or next;
@@ -95,8 +96,8 @@
     
     my $doc = $this->Transform($data);
     $doc->nodeProperty( query => $query );
-    $this->Errors->Append( $this->_navi->BuildErrors);
-    $this->Errors->Append( $this->_schema->Validate($doc));
+    $this->errors->Append( $this->_navi->BuildErrors);
+    $this->errors->Append( $this->_schema->Validate($doc));
     return $doc;
 }