DOM/Comment.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 87.5% 7 / 8 Podpod 60.0% 3 / 5 totaltotal 73.9% 34 / 46 SCAR 14.2
CC
4
Cov
80%
isa
5.2
endtag
2.0
BEGIN
1.0
CRAP 4.1
« DOM/Event.pm ↑ Summary DOM/Implementation.pm »
1 package HTML::DOM::Comment;
2  
3 25 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 25 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 25 ▶use HTML::DOM::Node 'COMMENT_NODE';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 25 require HTML::DOM::CharacterData;
9  
10 25 our @ISA = 'HTML::DOM::CharacterData';
11 25 our $VERSION = '0.057';
12  
13 sub new { # $_[1] contains the text
14 15 ▶ $_[0]->SUPER::new('~comment', text => $_[1]);
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
15 }
16  
17 # ---------------- NODE METHODS ---------- #
18  
19 5 ▶sub nodeName { '#comment' }
Subroutine nodeName: called CC=1 SCAR=0.0
Pod documented
20 25 *nodeType = \&COMMENT_NODE;
21  
22 # ---------------- OVERRIDDEN HTML::Element METHODS ---------- #
23  
24 4 ▶sub starttag { sprintf "<!--%s-->", shift->data }
Subroutine starttag: called CC=1 SCAR=0.0
Pod documented
25 0 ▶sub endtag { '' }
Subroutine endtag: not called CC=1 SCAR=6.9
Pod documented
26  
27 sub isa { # Lie to HTML::Element 4
28 9 ▶ caller eq 'HTML::Element' && VERSION HTML::Element >= 4
Subroutine isa: called CC=4 SCAR=16.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
caller eq "HTML::Element" and "HTML::Element"->VERSION >= 4 and $_[1] eq "HTML::DOM::Element" and return 1 0 9 9
Condition33%2/6
caller eq "HTML::Element" and "HTML::Element"->VERSION >= 4 and $_[1] eq "HTML::DOM::Element"
!ll&&!rl&&r
900
caller eq "HTML::Element" and "HTML::Element"->VERSION >= 4
!ll&&!rl&&r
900
MC/DC0%0/3
caller eq "HTML::Element" and "HTML::Element"->VERSION >= 4 and $_[1] eq "HTML::DOM::Element"
caller eq "HTML::Element" "HTML::Element"->VERSION >= 4 $_[1] eq "HTML::DOM::Element"
Truth table25%1/4
A and B and C
A= caller eq "HTML::Element"B= "HTML::Element"->VERSION >= 4C= $_[1] eq "HTML::DOM::Element"
ABCresult
0XX0
10X0
1100
1111
29 and $_[1] eq 'HTML::DOM::Element' and return 1;
30 9 goto &{;can{$_[0]}"SUPER::isa"};
31 }
32  
33 25 1
34 __END__
« DOM/Event.pm ↑ Summary DOM/Implementation.pm »