15
|
1 package IMPL::DOM::Document;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
|
5 use base qw(IMPL::DOM::Node);
|
|
6
|
|
7 __PACKAGE__->PassThroughArgs;
|
|
8
|
37
|
9 sub document {
|
|
10 return $_[0];
|
|
11 }
|
|
12
|
15
|
13 sub Create {
|
|
14 my ($this,$nodeName,$class,$refProps) = @_;
|
|
15
|
|
16 $refProps ||= {};
|
|
17
|
24
|
18 delete $refProps->{nodeName};
|
|
19
|
15
|
20 return $class->new(
|
|
21 nodeName => $nodeName,
|
37
|
22 document => $this,
|
15
|
23 %$refProps
|
|
24 );
|
|
25 }
|
|
26
|
36
|
27 {
|
|
28 my $empty;
|
|
29 sub Empty() {
|
|
30 return $empty ? $empty : $empty = __PACKAGE__->new(nodeName => 'Empty');
|
|
31 }
|
|
32 }
|
|
33
|
15
|
34 1;
|
|
35 __END__
|
|
36
|
|
37 =pod
|
|
38
|
|
39 =head1 DESCRIPTION
|
|
40
|
18
|
41 =head1 METHODS
|
|
42
|
|
43 =over
|
|
44
|
|
45 =item C<<$doc->Create>>
|
|
46
|
15
|
47 .
|
|
48
|
18
|
49 =back
|
|
50
|
15
|
51 =cut |