comparison Lib/IMPL/DOM/Node.pm @ 1:3b418b134d8c

ORM in progress
author Sergey
date Fri, 17 Jul 2009 13:30:46 +0400
parents 03e58a454b20
children e59f44f75f20
comparison
equal deleted inserted replaced
0:03e58a454b20 1:3b418b134d8c
5 use base qw(IMPL::Object IMPL::Object::Serializable IMPL::Object::Autofill); 5 use base qw(IMPL::Object IMPL::Object::Serializable IMPL::Object::Autofill);
6 6
7 use IMPL::Class::Property; 7 use IMPL::Class::Property;
8 use IMPL::Class::Property::Direct; 8 use IMPL::Class::Property::Direct;
9 use Scalar::Util qw(weaken); 9 use Scalar::Util qw(weaken);
10
11 use IMPL::Exception;
10 12
11 __PACKAGE__->PassThroughArgs; 13 __PACKAGE__->PassThroughArgs;
12 14
13 BEGIN { 15 BEGIN {
14 public property nodeName => prop_get | owner_set; 16 public property nodeName => prop_get | owner_set;
18 public property parentNode => prop_get | owner_set; 20 public property parentNode => prop_get | owner_set;
19 private property _propertyMap => prop_all; 21 private property _propertyMap => prop_all;
20 } 22 }
21 23
22 sub CTOR { 24 sub CTOR {
23 my $this = @_; 25 my ($this,$name) = @_;
24 26
27 $this->nodeName($name) or die new IMPL::InvalidArgumentException("A name is required");
25 $this->_propertyMap({}); 28 $this->_propertyMap({});
26 } 29 }
27 30
28 sub insertNode { 31 sub insertNode {
29 my ($this,$node,$pos) = @_; 32 my ($this,$node,$pos) = @_;