line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML5::DOM::Node; |
2
|
3
|
|
|
3
|
|
22
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
123
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
623
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
9
|
|
|
9
|
|
97
|
'""' => sub { $_[0]->html }, |
7
|
1
|
|
|
1
|
|
8971
|
'@{}' => sub { $_[0]->childrenNode->array }, |
8
|
|
|
|
|
|
|
'%{}' => \&__attrHashAccess, |
9
|
193
|
50
|
|
193
|
|
61288
|
'==' => sub { defined $_[1] && $_[0]->isSameNode($_[1]) }, |
10
|
26
|
|
33
|
26
|
|
291
|
'!=' => sub { !defined $_[1] || !$_[0]->isSameNode($_[1]) }, |
11
|
56
|
|
|
56
|
|
17706
|
'bool' => sub { 1 }, |
12
|
3
|
|
|
3
|
|
24
|
fallback => 1; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
53
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# https://developer.mozilla.org/pl/docs/Web/API/Element/nodeType |
15
|
3
|
|
|
3
|
|
476
|
use constant ELEMENT_NODE => 1; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
626
|
|
16
|
3
|
|
|
3
|
|
21
|
use constant ATTRIBUTE_NODE => 2; # not supported |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
153
|
|
17
|
3
|
|
|
3
|
|
19
|
use constant TEXT_NODE => 3; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
174
|
|
18
|
3
|
|
|
3
|
|
19
|
use constant CDATA_SECTION_NODE => 4; # not supported |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
165
|
|
19
|
3
|
|
|
3
|
|
19
|
use constant ENTITY_REFERENCE_NODE => 5; # not supported |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
177
|
|
20
|
3
|
|
|
3
|
|
20
|
use constant ENTITY_NODE => 6; # not supported |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
142
|
|
21
|
3
|
|
|
3
|
|
17
|
use constant PROCESSING_INSTRUCTION_NODE => 7; # not supported |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
175
|
|
22
|
3
|
|
|
3
|
|
72
|
use constant COMMENT_NODE => 8; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
140
|
|
23
|
3
|
|
|
3
|
|
27
|
use constant DOCUMENT_NODE => 9; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
166
|
|
24
|
3
|
|
|
3
|
|
20
|
use constant DOCUMENT_TYPE_NODE => 10; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
136
|
|
25
|
3
|
|
|
3
|
|
40
|
use constant DOCUMENT_FRAGMENT_NODE => 11; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
190
|
|
26
|
3
|
|
|
3
|
|
19
|
use constant NOTATION_NODE => 12; # not supported |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
337
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub __attrHashAccess { |
29
|
7
|
|
|
7
|
|
3433
|
my $self = shift; |
30
|
7
|
|
|
|
|
13
|
my %h; |
31
|
7
|
|
|
|
|
30
|
tie %h, 'HTML5::DOM::Node::_AttrHashAccess', $self; |
32
|
7
|
|
|
|
|
35
|
return \%h; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package HTML5::DOM::Node::_AttrHashAccess; |
38
|
3
|
|
|
3
|
|
22
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
97
|
|
39
|
3
|
|
|
3
|
|
24
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
560
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub TIEHASH { |
42
|
7
|
|
|
7
|
|
11
|
my $p = shift; |
43
|
7
|
|
|
|
|
24
|
bless \shift, $p |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub EXISTS { |
47
|
1
|
|
|
1
|
|
4
|
defined ${shift()}->attr(shift); |
|
1
|
|
|
|
|
13
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub DELETE { |
51
|
0
|
|
|
0
|
|
0
|
${shift()}->removeAttr(shift); |
|
0
|
|
|
|
|
0
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub FETCH { |
55
|
6
|
|
|
6
|
|
11
|
${shift()}->attr(shift); |
|
6
|
|
|
|
|
61
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub STORE { |
59
|
0
|
|
|
0
|
|
|
${shift()}->attr(shift, shift); |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |