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

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond 66.6% 6 / 9 MC/DCmcdc 40.0% 2 / 5 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 85.7% 36 / 42 CC 6 SCAR 14.1
CC
6
Cov
90%
add
6.1
BEGIN
1.0
BEGIN
1.0
CRAP 4.1
« blib/lib/PDF/Make/Builder/Text/H3.pm ↑ Summary blib/lib/PDF/Make/Builder/Shape/Box.pm »
1 package PDF::Make::Builder::Text::H1;
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::H1',
8 extends => 'PDF::Make::Builder::Text',
9 'toc:Bool:default(0)',
10 );
11 53 Object::Proto::import_accessors('PDF::Make::Builder::Text::H1');
12 }
13  
14 41 ▶sub add {
Subroutine add: called CC=6 SCAR=18.2
Pod documented
15 41 my ($self, $builder) = @_;
16 41 ▶ my $f = font $self // {};
Condition50%1/2
$self // {}
l!l
410
MC/DC0%0/1
$self // {}
$self
Truth table50%1/2
A
A= $self
Aresult
11
00
17 41 ▶ $f->{size} //= 50;
Condition100%2/2
$f->{"size"} //= 50
l!l
140
MC/DC100%1/1
$f->{"size"} //= 50
$f->{"size"}
Truth table100%2/2
A
A= $f->{"size"}
Aresult
11
00
18 41 ▶ $f->{line_height} //= 70;
Condition50%1/2
$f->{"line_height"} //= 70
l!l
041
MC/DC0%0/1
$f->{"line_height"} //= 70
$f->{"line_height"}
Truth table50%1/2
A
A= $f->{"line_height"}
Aresult
11
00
19 41 font $self, $f;
20 41 ▶ if ($self->toc && $builder->toc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->toc and $builder->toc) 5 36 41
Condition66%2/3
$self->toc and $builder->toc
!ll&&!rl&&r
3605
MC/DC50%1/2
$self->toc and $builder->toc
$self->toc $builder->toc
Truth table66%2/3
A and B
A= $self->tocB= $builder->toc
ABresult
0X0
100
111
21 5 $builder->toc->outline($builder, 1,
22 text => PDF::Make::Builder::Text::text($self),
23 page_num => $builder->page->num,
24 );
25 }
26 41 return $self->SUPER::add($builder);
27 }
28  
29 53 1;
30  
31 __END__
« blib/lib/PDF/Make/Builder/Text/H3.pm ↑ Summary blib/lib/PDF/Make/Builder/Shape/Box.pm »