blib/lib/PDF/Make/Builder/Text/H4.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond 44.4% 4 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 71.4% 30 / 42 CC 6 SCAR 16.3
CC
6
Cov
77%
add
7.8
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« blib/lib/PDF/Make/Builder/Shape/Line.pm ↑ Summary blib/lib/PDF/Make/Builder/Text/H5.pm »
1 package PDF::Make::Builder::Text::H4;
2 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 53 ▶use Object::Proto;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 53 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 53 Object::Proto::define('PDF::Make::Builder::Text::H4',
8 extends => 'PDF::Make::Builder::Text',
9 'toc:Bool:default(0)',
10 );
11 53 Object::Proto::import_accessors('PDF::Make::Builder::Text::H4');
12 }
13  
14 3 ▶sub add {
Subroutine add: called CC=6 SCAR=20.5
Pod documented
15 3 my ($self, $builder) = @_;
16 3 ▶ my $f = font $self // {};
Condition50%1/2
$self // {}
l!l
30
MC/DC0%0/1
$self // {}
$self
Truth table50%1/2
A
A= $self
Aresult
11
00
17 3 ▶ $f->{size} //= 25;
Condition50%1/2
$f->{"size"} //= 25
l!l
03
MC/DC0%0/1
$f->{"size"} //= 25
$f->{"size"}
Truth table50%1/2
A
A= $f->{"size"}
Aresult
11
00
18 3 ▶ $f->{line_height} //= 29;
Condition50%1/2
$f->{"line_height"} //= 29
l!l
03
MC/DC0%0/1
$f->{"line_height"} //= 29
$f->{"line_height"}
Truth table50%1/2
A
A= $f->{"line_height"}
Aresult
11
00
19 3 font $self, $f;
20  
21 3 ▶ if ($self->toc && $builder->toc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->toc and $builder->toc) 0 3 3
Condition33%1/3
$self->toc and $builder->toc
!ll&&!rl&&r
300
MC/DC0%0/2
$self->toc and $builder->toc
$self->toc $builder->toc
Truth table33%1/3
A and B
A= $self->tocB= $builder->toc
ABresult
0X0
100
111
22 0 $builder->toc->outline($builder, 4,
23 text => PDF::Make::Builder::Text::text($self),
24 page_num => $builder->page->num,
25 );
26 }
27  
28 3 return $self->SUPER::add($builder);
29 }
30  
31 53 1;
32  
33 __END__
« blib/lib/PDF/Make/Builder/Shape/Line.pm ↑ Summary blib/lib/PDF/Make/Builder/Text/H5.pm »