SVGPDF/Defs.pm

filter: Statementstmt 93.3% 28 / 30 Branchbran 50.0% 4 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 75.5% 37 / 49 CC 7 SCAR 17.7
CC
7
Cov
78%
process
8.6
BEGIN
1.0
BEGIN
1.0
CRAP 5.9
« SVGPDF/Rect.pm ↑ Summary SVGPDF/PAST.pm »
1 #! perl
2  
3 2 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 class SVGPDF::Defs :isa(SVGPDF::Element);
9  
10 1 ▶method process () {
Subroutine process: called CC=7 SCAR=21.5
Pod undocumented
11 1 my $atts = $self->atts;
12 1 my $xo = $self->xo;
13 1 ▶ return if $atts->{omit}; # for testing/debugging.
Branch: 1 branch
BranchTrueFalseTotal
if $atts->{"omit"} 0 1 1
14  
15 1 $self->_dbg( "+", $self->name, " ====" );
16  
17 1 for ( $self->get_children ) {
18 3 ▶ next if ref($_) eq 'SVGPDF::TextElement';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_ eq "SVGPDF::TextElement" 2 1 3
19 1 my $id = $_->atts->{id};
20 1 ▶ unless ( defined($id) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $id) 0 1 1
21 0 ▶ warn("SVG: Missing id for ", $_->name, " in defs (skipped)\n")
Branch: 1 branch
BranchTrueFalseTotal
if $self->root->verbose and $_->name ne "style" 0 0 0
Condition0%0/3
$self->root->verbose and $_->name ne "style"
!ll&&!rl&&r
000
MC/DC0%0/2
$self->root->verbose and $_->name ne "style"
$self->root->verbose $_->name ne "style"
Truth table0%0/3
A and B
A= $self->root->verboseB= $_->name ne "style"
ABresult
0X0
100
111
22 if $self->root->verbose && $_->name ne "style";
23 0 next;
24 }
25 1 $self->_dbg( "defs: \"$id\" (", $_->name, ")" );
26 1 $self->root->defs->{ "#$id" } = $_;
27 }
28  
29 1 $self->_dbg( "-" );
30 2 }
31  
32  
33 2 1;
« SVGPDF/Rect.pm ↑ Summary SVGPDF/PAST.pm »