line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML5::DOM::Node; |
2
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
99
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
586
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
9
|
|
|
9
|
|
78
|
'""' => sub { $_[0]->html }, |
7
|
1
|
|
|
1
|
|
8295
|
'@{}' => sub { $_[0]->childrenNode->array }, |
8
|
|
|
|
|
|
|
'%{}' => \&__attrHashAccess, |
9
|
193
|
50
|
|
193
|
|
60499
|
'==' => sub { defined $_[1] && $_[0]->isSameNode($_[1]) }, |
10
|
26
|
|
33
|
26
|
|
271
|
'!=' => sub { !defined $_[1] || !$_[0]->isSameNode($_[1]) }, |
11
|
56
|
|
|
56
|
|
17380
|
'bool' => sub { 1 }, |
12
|
3
|
|
|
3
|
|
22
|
fallback => 1; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
33
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# https://developer.mozilla.org/pl/docs/Web/API/Element/nodeType |
15
|
3
|
|
|
3
|
|
428
|
use constant ELEMENT_NODE => 1; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
269
|
|
16
|
3
|
|
|
3
|
|
21
|
use constant ATTRIBUTE_NODE => 2; # not supported |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
150
|
|
17
|
3
|
|
|
3
|
|
18
|
use constant TEXT_NODE => 3; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
174
|
|
18
|
3
|
|
|
3
|
|
19
|
use constant CDATA_SECTION_NODE => 4; # not supported |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
157
|
|
19
|
3
|
|
|
3
|
|
19
|
use constant ENTITY_REFERENCE_NODE => 5; # not supported |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
172
|
|
20
|
3
|
|
|
3
|
|
19
|
use constant ENTITY_NODE => 6; # not supported |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
139
|
|
21
|
3
|
|
|
3
|
|
17
|
use constant PROCESSING_INSTRUCTION_NODE => 7; # not supported |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
173
|
|
22
|
3
|
|
|
3
|
|
66
|
use constant COMMENT_NODE => 8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
140
|
|
23
|
3
|
|
|
3
|
|
28
|
use constant DOCUMENT_NODE => 9; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
193
|
|
24
|
3
|
|
|
3
|
|
19
|
use constant DOCUMENT_TYPE_NODE => 10; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
126
|
|
25
|
3
|
|
|
3
|
|
35
|
use constant DOCUMENT_FRAGMENT_NODE => 11; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
180
|
|
26
|
3
|
|
|
3
|
|
19
|
use constant NOTATION_NODE => 12; # not supported |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
310
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub __attrHashAccess { |
29
|
7
|
|
|
7
|
|
3465
|
my $self = shift; |
30
|
7
|
|
|
|
|
12
|
my %h; |
31
|
7
|
|
|
|
|
34
|
tie %h, 'HTML5::DOM::Node::_AttrHashAccess', $self; |
32
|
7
|
|
|
|
|
37
|
return \%h; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package HTML5::DOM::Node::_AttrHashAccess; |
38
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
91
|
|
39
|
3
|
|
|
3
|
|
24
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
517
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub TIEHASH { |
42
|
7
|
|
|
7
|
|
10
|
my $p = shift; |
43
|
7
|
|
|
|
|
23
|
bless \shift, $p |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub EXISTS { |
47
|
1
|
|
|
1
|
|
3
|
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
|
|
9
|
${shift()}->attr(shift); |
|
6
|
|
|
|
|
63
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub STORE { |
59
|
0
|
|
|
0
|
|
|
${shift()}->attr(shift, shift); |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |