comparison Lib/IMPL/DOM/Document.pm @ 315:77df11605d3a

code cleanup
author cin
date Tue, 07 May 2013 02:19:24 +0400
parents c6d0f889ef87
children 010ceafd0c5a
comparison
equal deleted inserted replaced
314:109f28643025 315:77df11605d3a
1 package IMPL::DOM::Document; 1 package IMPL::DOM::Document;
2 use strict; 2 use strict;
3 use warnings; 3 use warnings;
4 4
5 use IMPL::lang; 5 use IMPL::lang;
6 use parent qw(IMPL::DOM::Node); 6 use IMPL::declare {
7 7 require => {
8 __PACKAGE__->PassThroughArgs; 8 DOMNode => 'IMPL::DOM::Node'
9 },
10 base => [
11 DOMNode => '@_'
12 ]
13 };
9 14
10 sub document { 15 sub document {
11 return $_[0]; 16 return $_[0];
12 } 17 }
13 18
17 if ( ref $class eq 'HASH' ) { 22 if ( ref $class eq 'HASH' ) {
18 $refProps = $class; 23 $refProps = $class;
19 $class = undef; 24 $class = undef;
20 } 25 }
21 26
22 $class ||= typeof IMPL::DOM::Node; 27 $class ||= DOMNode;
23 $refProps ||= {}; 28 $refProps ||= {};
24 29
25 delete $refProps->{nodeName}; 30 delete $refProps->{nodeName};
26 31
27 die new IMPL::Exception("class is not specified") unless $class; 32 die new IMPL::Exception("class is not specified") unless $class;