changeset 6:e2cd73ccc5bd

DOM In development
author Sergey
date Fri, 14 Aug 2009 16:14:13 +0400
parents efa7db58abae
children 94d47b388442
files Lib/IMPL/DOM/Node.pm Lib/IMPL/Web/Document.pm Lib/IMPL/Web/TDocument.pm
diffstat 3 files changed, 30 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Node.pm	Thu Aug 13 17:33:18 2009 +0400
+++ b/Lib/IMPL/DOM/Node.pm	Fri Aug 14 16:14:13 2009 +0400
@@ -19,14 +19,13 @@
     public _direct property nodeValue => prop_all;
     public _direct property childNodes => { get => \&_getChildNodes };
     public _direct property parentNode => prop_get ;
-    private _direct property _propertyMap => prop_all;
+    private _direct property _propertyMap => prop_get ;
 }
 
 sub CTOR {
     my ($this,$name) = @_;
     
     $this->nodeName($name) or die new IMPL::InvalidArgumentException("A name is required");
-    $this->_propertyMap({});
 }
 
 sub insertNode {
@@ -104,9 +103,9 @@
     
     if (@_) {
         # set
-        return $this->_propertyMap->{$name} = shift;
+        return $this->{$_propertyMap}{$name} = shift;
     } else {
-        return $this->_propertyMap->{$name};
+        return $this->{$_propertyMap}{$name};
     }
 }
 
--- a/Lib/IMPL/Web/Document.pm	Thu Aug 13 17:33:18 2009 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-package IMPL::Web::Document;
-use strict;
-use warnings;
-
-require Exporter;
-our @ISA = qw(Exporter);
-our @EXPORT_OK = qw();
-
-
-
-1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Web/TDocument.pm	Fri Aug 14 16:14:13 2009 +0400
@@ -0,0 +1,27 @@
+package IMPL::Web::TDocument;
+use strict;
+use warnings;
+
+use base qw(IMPL::DOM::Node);
+use Template::Context;
+use Template::Provider;
+use IMPL::Class::Property;
+use File::Spec;
+
+BEGIN {
+    public property Templates => prop_get | owner_set;
+    public property Context => prop_get | owner_set;
+}
+
+our %CTOR = (
+    'IMPL::DOM::Node' => sub { nodeName => 'document' }
+);
+
+sub load {
+    my ($this,$file) = @_;
+    
+    $file = File::Spec->rel2abs($file);
+    
+}
+
+1;