Khonsu/Page/Footer.pm

filter: Statementstmt 100% 12 / 12 Branchbran 62.5% 5 / 8 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 76.9% 20 / 26 CC 6 SCAR 17.3
CC
6
Cov
82%
render
6.4
BEGIN
1.0
CRAP 5.6
« Khonsu/Text.pm ↑ Summary Khonsu/TOC.pm »
1 package Khonsu::Page::Footer;
2  
3 3 ▶use parent 'Khonsu::Page::Header';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub render {
6 121 ▶ my ($self, $file) = @_;
Subroutine render: called CC=6 SCAR=18.6
Pod undocumented
7 121 ▶ return unless $self->active();
Branch: 1 branch
BranchTrueFalseTotal
unless $self->active 1 120 121
8 120 my $y = ($file->page->h - $self->h) + (($self->h / 2) - ($self->font->size / 2));
9 120 ▶ my $w = $file->page->w - ($self->padding ? ( $self->padding * 2 ) : $self->padding);
Branch: 1 branch
BranchTrueFalseTotal
$self->padding ? : 120 0 120
10 120 ▶ my $x = $self->padding || 0;
Condition50%1/2
$self->padding || 0
l!l
1200
MC/DC0%0/1
$self->padding || 0
$self->padding
Truth table50%1/2
A
A= $self->padding
Aresult
11
00
11 120 ▶ if ($self->show_page_num) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->show_page_num) 120 0 120
12 120 $self->add(
13 $file,
14 text => $self->process_page_num_text($file),
15 y => $y,
16 w => $w,
17 x => $x,
18 align => $self->show_page_num
19 );
20 }
21  
22 120 ▶ $self->cb->(
Branch: 1 branch
BranchTrueFalseTotal
if $self->cb 120 0 120
23 $self,
24 $file,
25 y => $y,
26 w => $w,
27 x => $x,
28 ) if ($self->cb);
29 }
30  
31 3 1;
« Khonsu/Text.pm ↑ Summary Khonsu/TOC.pm »