blib/lib/Mxpress/PDF.pm

filter: Statementstmt 71.4% 1773 / 2480 Branchbran 41.5% 231 / 556 Conditioncond 33.3% 264 / 792 MC/DCmcdc 7.6% 38 / 496 Subroutinesub 76.0% 283 / 372 Podpod 32.6% 32 / 98 totaltotal 54.6% 2621 / 4794 CC 596 SCAR 26.6
CC
596
Cov
59%
__ANON__
127.7
__ANON__
67.2
__ANON__
56.0
CRAP 14.2
↑ Summary
1 3 ▶use v5.18;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 package Mxpress::PDF {
6 3 ▶ BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 our $VERSION = '0.29';
8 3 our $AUTHORITY = 'cpan:LNATION';
9 };
10 3 ▶ use Zydeco;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶ use Colouring::In;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶ use constant mm => 25.4 / 72;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 3 ▶ use constant pt => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 3 ▶ class File (HashRef $args) {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: called CC=1 SCAR=1.2
Subroutine __ANON__: called CC=3 SCAR=14.2
15 0 ▶ my @plugins = (qw/font list border line box circle pie ellipse text title subtitle subsubtitle h1 h2 h3 h4 h5 h6 toc image form input textarea select annotation cover/, ($args->{plugins} ? @{$args->{plugins}} : ()));
Branch: 1 branch
BranchTrueFalseTotal
$args->{'plugins'} ? : 0 2 2
16 2 for my $p (@plugins) {
17 52 my $meth = sprintf('_store_%s', $p);
18 52 has {$meth} (is => 'rw', type => Object);
19 method {$p} () {
20 0 ▶ my $klass = $self->$meth;
Subroutine __ANON__: called CC=3 SCAR=17.9
Subroutine annotation: not called CC=3 SCAR=18.3
Subroutine border: called CC=3 SCAR=18.3
Subroutine box: called CC=3 SCAR=18.3
Subroutine circle: not called CC=3 SCAR=18.3
Subroutine cover: called CC=3 SCAR=18.3
Subroutine ellipse: not called CC=3 SCAR=18.3
Subroutine font: not called CC=3 SCAR=18.3
Subroutine form: not called CC=3 SCAR=18.3
Subroutine h1: not called CC=3 SCAR=18.3
Subroutine h2: not called CC=3 SCAR=18.3
Subroutine h3: not called CC=3 SCAR=18.3
Subroutine h4: not called CC=3 SCAR=18.3
Subroutine h5: not called CC=3 SCAR=18.3
Subroutine h6: not called CC=3 SCAR=18.3
Subroutine image: called CC=3 SCAR=18.3
Subroutine input: not called CC=3 SCAR=18.3
Subroutine line: not called CC=3 SCAR=18.3
Subroutine list: not called CC=3 SCAR=18.3
Subroutine pie: not called CC=3 SCAR=18.3
Subroutine select: not called CC=3 SCAR=18.3
Subroutine subsubtitle: called CC=3 SCAR=18.3
Subroutine subtitle: called CC=3 SCAR=18.3
Subroutine text: called CC=3 SCAR=18.3
Subroutine textarea: not called CC=3 SCAR=18.3
Subroutine title: called CC=3 SCAR=18.3
Subroutine toc: called CC=3 SCAR=18.3
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 26 branches
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 2 2
ref $tmp eq 'HASH' ? : 0 2 2
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 1 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition22%18/81
ref $self || $self
l!l&&r!l&&!r
73800
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
15720
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
410
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
4910
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
8710
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
22910
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
6510
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10210
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::File::__GEN000001__", "Mxpress::PDF::File::__GEN000001__::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
21 738 if (!$klass) {
22 738 ▶ $klass = $class->FACTORY->$p($self, %{$args->{$p}});
Branch: 1 branch
BranchTrueFalseTotal
unless ($klass) 11 727 738
23 11 $self->$meth($klass);
24 11 }
25 return $klass;
26 738 }
27 52 }
28 2 has file_name (is => 'rw', type => Str, required => 1);
29 2 has pdf (required => 1, is => 'rw', type => Object);
30 2 has pages (required => 1, is => 'rw', type => ArrayRef);
31 2 has page (is => 'rw', type => Object);
32 2 has page_args (is => 'rw', type => HashRef);
33 2 has onsave_cbs (is => 'rw', type => ArrayRef);
34 2 has page_offset (is => 'rw', type => Num);
35 method add_page (Map %args) {
36 131 ▶ $args{is_rotated} = 0;
Subroutine __ANON__: called CC=15 SCAR=28.4
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 131 0 131
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
13100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
37 131 if ($self->page) {
38 131 ▶ unless ($args{force_new_page}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->page) 129 2 131
39 129 ▶ my $border = $self->border->active;
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"force_new_page"}) 127 2 129
40 127 $self->border->end if $border;
41 127 ▶ my $next = $self->page->next_column();
Branch: 1 branch
BranchTrueFalseTotal
if $border 0 127 127
42 127 $next = $self->page->next_row() if !$next;
43 127 ▶ if ($border) {
Branch: 1 branch
BranchTrueFalseTotal
unless $next 64 63 127
44 127 ▶ $self->border->start if $next;
Branch: 1 branch
BranchTrueFalseTotal
if ($border) 0 127 127
45 0 ▶ $self->border->active(1);
Branch: 1 branch
BranchTrueFalseTotal
if $next 0 0 0
46 0 }
47 return if $next;
48 127 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
if $next 95 32 127
49 $args{h_offset} = $self->page->h_offset;
50 34 $args{is_rotated} = $self->page->is_rotated;
51 34 $args{columns} = $self->page->columns;
52 34 }
53 my $border = $self->{_store_border} && $self->border->active;
54 36 ▶ $self->border->end if $border;
Condition66%2/3
$self->{'_store_border'} && $self->border->active
!ll&&!rl&&r
4320
MC/DC0%0/2
$self->{'_store_border'} && $self->border->active
$self->{'_store_border'} $self->border->active
Truth table66%2/3
A && B
A= $self->{'_store_border'}B= $self->border->active
ABresult
0X0
100
111
55 36 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if $border 0 36 36
56 my @attrs = qw/active padding show_page_num page_num_text onsave_cbs x y w h background columns column rows row row_y/;
57 36 my $page = $self->FACTORY->page(
58 $self->pdf,
59 page_size => 'A4',
60 %{ $self->page_args },
61 36 ▶ ($self->page ? (
Branch: 1 branch
BranchTrueFalseTotal
$self->page ? : 34 2 36
62 num => $self->page->num + 1,
63 header => $self->page->header->attrs(@attrs),
64 footer => $self->page->footer->attrs(@attrs)
65 ) : ()),
66 %args,
67 );
68 push @{$self->pages}, $page;
69 36 $self->page($page);
70 36 $self->box->add( fill_colour => $page->background, full => \1 ) if $page->background;
71 36 ▶ $self->page->set_position($page->parse_position([]));
Branch: 1 branch
BranchTrueFalseTotal
if $page->background 36 0 36
72 36 $self->border->start if $border;
73 36 ▶ $self;
Branch: 1 branch
BranchTrueFalseTotal
if $border 0 36 36
74 2 }
75 2 method save {
76 132 ▶ $self->_handle_on_save;
Subroutine __ANON__: called CC=2 SCAR=7.0
Condition66%2/3
ref $self || $self
l!l&&r!l&&!r
13020
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
77 3 $self->pdf->saveas();
78 132 $self->pdf->end();
79 2 }
80 2 method stringify {
81 0 ▶ $self->_handle_on_save;
Subroutine __ANON__: called CC=2 SCAR=14.3
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
82 0 my $string = $self->pdf->stringify();
83 0 $self->pdf->end();
84 0 return $string;
85 0 }
86 2 method _handle_on_save {
87 1 ▶ my @pages = @{$self->pages};
Subroutine __ANON__: called CC=7 SCAR=19.6
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
88 1 if ($self->cover->active) {
89 1 ▶ $self->page(shift @pages);
Branch: 1 branch
BranchTrueFalseTotal
if ($self->cover->active) 1 2 3
90 1 $self->page->current($self->pdf->openpage(1));
91 1 $self->cover->run_onsave_cbs($self);
92 1 }
93 if ($self->onsave_cbs) {
94 1 ▶ for my $cb (@{$self->onsave_cbs}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->onsave_cbs) 1 0 1
95 1 my ($plug, $meth, $args) = @{$cb};
96 1 $self->$plug->$meth(%{$args});
97 1 }
98 }
99 for my $page (@pages) {
100 1 $page->num($page->num + ($self->page_offset || 0));
101 32 ▶ $page->current($self->pdf->openpage($page->num));
Condition50%1/2
$self->page_offset || 0
l!l
032
MC/DC0%0/1
$self->page_offset || 0
$self->page_offset
Truth table50%1/2
A
A= $self->page_offset
Aresult
11
00
102 32 $self->page($page)->run_onsave_cbs($self);
103 32 }
104 2 }
105 2 method onsave (Str $plug, Str $meth, Map %args) {
106 2 ▶ # todo role onsave
Subroutine __ANON__: called CC=4 SCAR=14.4
Branch: 1 branch
BranchTrueFalseTotal
@_ == 3 ? : 1 0 1
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
107 my $cbs = $self->onsave_cbs || [];
108 1 ▶ push @{$cbs}, [$plug, $meth, \%args];
Condition50%1/2
$self->onsave_cbs || []
l!l
01
MC/DC0%0/1
$self->onsave_cbs || []
$self->onsave_cbs
Truth table50%1/2
A
A= $self->onsave_cbs
Aresult
11
00
109 1 $self->onsave_cbs($cbs);
110 2 }
111 2 method mmp (Num $mm) {
112 3 ▶ return $mm/mm
Subroutine __ANON__: called CC=2 SCAR=7.0
Condition66%2/3
ref $self || $self
l!l&&r!l&&!r
210
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
113 3 }
114 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
115 3 ▶ class Page {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
116 6 with Utils;
117 4 has page_size (is => 'rw', type => Str, required => 1);
118 5 has background (is => 'rw', type => Str);
119 3 has num (is => 'rw', type => Num, required => 1);
120 3 has current (is => 'rw', type => Object);
121 3 has columns (is => 'rw', type => Num);
122 3 has column (is => 'rw', type => Num);
123 3 has rows (is => 'rw', type => Num);
124 3 has row (is => 'rw', type => Num);
125 3 has row_y (is => 'rw', type => Num);
126 3 has is_rotated (is => 'rw', type => Num);
127 3 has header (is => 'rw', type => HashRef|Object);
128 3 has footer (is => 'rw', type => HashRef|Object);
129 3 has x (is => 'rw', type => Num);
130 3 has y (is => 'rw', type => Num);
131 3 has w (is => 'rw', type => Num);
132 3 has h (is => 'rw', type => Num);
133 3 has oh (is => 'rw', type => Num);
134 3 has ow (is => 'rw', type => Num);
135 3 has saving (is => 'rw', type => Bool);
136 3 has onsave_cbs (is => 'rw', type => ArrayRef);
137 factory page (Object $pdf, Map %args) {
138 36 ▶ my $page = $args{open} ? $pdf->openpage($args{num}) : $pdf->page($args{num} || 0);
Subroutine __ANON__: called CC=7 SCAR=19.5
Subroutine page: called CC=3 SCAR=11.0
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 36 2 38
ref $tmp eq 'HASH' ? : 0 2 2
Condition66%2/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::page", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::page", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::page", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::page", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
139 36 ▶ $page->mediabox($args{page_size});
Branch: 1 branch
BranchTrueFalseTotal
$args{'open'} ? : 0 36 36
Condition66%2/3
$args{'num'} || 0
l!l
3530
MC/DC100%1/1
$args{'num'} || 0
$args{'num'}
Truth table100%2/2
A
A= $args{'num'}
Aresult
11
00
140 36 my ($blx, $bly, $trx, $try) = $page->get_mediabox;
141 36 @args{qw/x y w h oh ow/} = $args{is_rotated} ? (
142 0, $trx, $try, $trx, $trx, $try
143 36 ▶ ) : (
Branch: 1 branch
BranchTrueFalseTotal
$args{'is_rotated'} ? : 2 34 36
144 0, $try, $trx, $try, $try, $trx
145 );
146 $args{num} ||= 1;
147 36 ▶ my $new_page = $class->new(
Condition100%2/2
$args{"num"} ||= 1
l!l
342
MC/DC100%1/1
$args{"num"} ||= 1
$args{"num"}
Truth table100%2/2
A
A= $args{"num"}
Aresult
11
00
148 36 current => $page,
149 padding => 0,
150 columns => 1,
151 column => 1,
152 rows => 1,
153 row => 1,
154 h_offset => 0,
155 %args
156 );
157 for (qw/header footer/) {
158 36 $new_page->$_($factory->$_(
159 parent => $new_page,
160 %{$args{$_}},
161 72 ));
162 }
163 return $new_page;
164 3 }
165 3 method onsave (Str $plug, Str $meth, Any @args) {
166 3 ▶ my $cbs = $self->onsave_cbs || [];
Subroutine __ANON__: called CC=4 SCAR=14.1
Subroutine onsave: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 3 ? : 3 0 3
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
300
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::onsave", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
210
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::onsave", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::onsave", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::onsave", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
167 3 ▶ push @{$cbs}, [$plug, $meth, @args];
Condition100%2/2
$self->onsave_cbs || []
l!l
21
MC/DC100%1/1
$self->onsave_cbs || []
$self->onsave_cbs
Truth table100%2/2
A
A= $self->onsave_cbs
Aresult
11
00
168 3 $self->onsave_cbs($cbs);
169 3 }
170 3 method run_onsave_cbs (Object $file) {
171 97 ▶ $self->saving(\1);
Subroutine __ANON__: called CC=8 SCAR=21.1
Subroutine run_onsave_cbs: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
9700
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::run_onsave_cbs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
9610
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::run_onsave_cbs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::run_onsave_cbs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::run_onsave_cbs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
172 97 if ($self->onsave_cbs) {
173 97 ▶ for my $cb (@{$self->onsave_cbs}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->onsave_cbs) 65 32 97
174 65 my ($plug, $meth, @args) = @{$cb};
175 65 $file->$plug->$meth(@args);
176 65 }
177 }
178 $self->header->run_onsave_cbs($file) if $self->header && $self->header->active;
179 97 ▶ $self->footer->run_onsave_cbs($file) if $self->footer && $self->footer->active;
Branch: 1 branch
BranchTrueFalseTotal
if $self->header and $self->header->active 32 65 97
Condition66%2/3
$self->header and $self->header->active
!ll&&!rl&&r
65032
MC/DC50%1/2
$self->header and $self->header->active
$self->header $self->header->active
Truth table66%2/3
A and B
A= $self->headerB= $self->header->active
ABresult
0X0
100
111
180 97 ▶ return $file;
Branch: 1 branch
BranchTrueFalseTotal
if $self->footer and $self->footer->active 32 65 97
Condition66%2/3
$self->footer and $self->footer->active
!ll&&!rl&&r
65032
MC/DC50%1/2
$self->footer and $self->footer->active
$self->footer $self->footer->active
Truth table66%2/3
A and B
A= $self->footerB= $self->footer->active
ABresult
0X0
100
111
181 3 }
182 3 method rotate {
183 1 ▶ my ($blx, $bly, $trx, $try) = $self->current->get_mediabox;
Subroutine __ANON__: called CC=2 SCAR=7.0
Subroutine rotate: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
184 1 $self->current->mediabox(
185 1 $self->x(0),
186 0,
187 $self->w($try),
188 $self->h($self->y($trx)),
189 );
190 $self->set_position($self->parse_position([]));
191 1 $self->is_rotated(!$self->is_rotated);
192 1 return $self;
193 3 }
194 3 method next_column {
195 127 ▶ if ($self->column < $self->columns) {
Subroutine __ANON__: called CC=5 SCAR=16.3
Subroutine next_column: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
12700
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
196 127 ▶ my $fh = !!$self->footer->active ? $self->footer->h : 0;
Branch: 1 branch
BranchTrueFalseTotal
if ($self->column < $self->columns) 63 64 127
197 63 ▶
Branch: 1 branch
BranchTrueFalseTotal
!!$self->footer->active ? : 63 0 63
198 $self->y($self->row_y ? $self->row_y : ($self->h + (($self->padding*2)/mm) + $fh));
199 63 ▶ $self->column($self->column + 1);
Branch: 1 branch
BranchTrueFalseTotal
$self->row_y ? : 31 32 63
200 63 return 1;
201 63 }
202 return;
203 3 }
204 3 method next_row {
205 64 ▶ if ($self->row < $self->rows) {
Subroutine __ANON__: called CC=4 SCAR=14.0
Subroutine next_row: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
6400
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
206 64 ▶ my $fh = $self->footer->active ? $self->header->h : 0;
Branch: 1 branch
BranchTrueFalseTotal
if ($self->row < $self->rows) 32 32 64
207 32 ▶ my ($blx, $bly, $trx, $try) = $self->current->get_mediabox;
Branch: 1 branch
BranchTrueFalseTotal
$self->footer->active ? : 32 0 32
208 32 my $row_height = ($self->h + (($self->padding*2)/mm)) / $self->rows;
209 32 my $offset = int($try - $fh - ($row_height * ($self->row)));
210 32 $self->row_y($self->y($offset));
211 32 $self->column(1);
212 32 $self->row($self->row + 1);
213 32 return 1;
214 32 }
215 return;
216 3 }
217 3 method attrs (Any @attrs) {
218 68 ▶ return {
Subroutine __ANON__: called CC=3 SCAR=11.3
Subroutine attrs: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 68 0 68
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
6800
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
6620
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page", "Mxpress::PDF::Page::attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
219 map +($_ => $self->$_), grep { defined $self->$_ } @attrs
220 68 }
221 3 }
222 3 method hf_offset {
223 1 ▶ return ($self->header->active ? $self->header->h : 0 ) + ($self->footer->active ? $self->footer->h : 0);
Subroutine __ANON__: called CC=4 SCAR=15.2
Subroutine hf_offset: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
224 1 ▶ }
Branch: 2 branches
BranchTrueFalseTotal
$self->header->active ? : 1 0 1
$self->footer->active ? : 1 0 1
225 3 ▶ class Page::Component {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
226 3 has parent (is => 'rw', type => Object);
227 3 has show_page_num (is => 'rw', type => Str);
228 3 has page_num_text (is => 'rw', type => Str);
229 3 has active (is => 'rw', type => Bool);
230 method add (Map %args) {
231 4 ▶ if ($args{cb}) {
Subroutine __ANON__: called CC=5 SCAR=16.3
Subroutine add: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 4 0 4
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
400
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
310
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
232 4 ▶ $self->onsave(@{ delete $args{cb} });
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"cb"}) 3 1 4
233 3 }
234 $self->set_attrs(%args);
235 4 if (!$self->active) {
236 4 ▶ $self->activate();
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->active) 3 1 4
237 3 # $self->parent->h_offset($self->parent->h_offset + $self->h);
238 }
239 return $self->parent;
240 3 }
241 3 method set_position () {
242 129 ▶ my $p = $self->padding/mm;
Subroutine __ANON__: called CC=4 SCAR=14.3
Subroutine set_position: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
12900
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
12810
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
243 129 $self->parent->set_position(
244 129 ▶ ($self->x > 100 ? ($self->x - $p) : ($self->x + $p)),
Branch: 2 branches
BranchTrueFalseTotal
$self->x > 100 ? : 0 129 129
$self->y > 100 ? : 65 64 129
245 ($self->y > 100 ? ($self->y - $p) : ($self->y + $p)),
246 ($self->w - $p),
247 $self->h
248 );
249 3 }
250 3 method process_page_num_text {
251 64 ▶ if ($self->page_num_text) {
Subroutine __ANON__: called CC=3 SCAR=11.1
Subroutine process_page_num_text: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
6400
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
252 64 ▶ (my $text = $self->page_num_text) =~ s/\{(.*)\}/$self->$1/eg;
Branch: 1 branch
BranchTrueFalseTotal
if ($self->page_num_text) 32 32 64
253 32 return $text;
254 32 }
255 return $self->parent->num;
256 3 }
257 3 method activate () {
258 34 ▶ $self->active(\1);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine activate: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
3400
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::activate", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3310
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::activate", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::activate", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Page::Component", "Mxpress::PDF::Page::Component::activate", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
259 34 return $self;
260 3 }
261 3 around run_onsave_cbs (Object $file) {
262 65 ▶ $self->set_position();
Subroutine __ANON__: called CC=7 SCAR=19.5
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
6500
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
263 65 $file->page->padding($self->padding);
264 65 $file->page->column($self->column || 1);
265 65 ▶ $file->page->columns($self->columns || 1);
Condition100%2/2
$self->column || 1
l!l
164
MC/DC100%1/1
$self->column || 1
$self->column
Truth table100%2/2
A
A= $self->column
Aresult
11
00
266 65 ▶ $file->page->row($self->row || 1);
Condition100%2/2
$self->columns || 1
l!l
164
MC/DC100%1/1
$self->columns || 1
$self->columns
Truth table100%2/2
A
A= $self->columns
Aresult
11
00
267 65 ▶ $file->page->rows($self->rows || 1);
Condition100%2/2
$self->row || 1
l!l
164
MC/DC100%1/1
$self->row || 1
$self->row
Truth table100%2/2
A
A= $self->row
Aresult
11
00
268 65 ▶ $self->$next($file);
Condition100%2/2
$self->rows || 1
l!l
164
MC/DC100%1/1
$self->rows || 1
$self->rows
Truth table100%2/2
A
A= $self->rows
Aresult
11
00
269 65 if ($self->show_page_num) {
270 65 ▶ $self->set_position();
Branch: 1 branch
BranchTrueFalseTotal
if ($self->show_page_num) 64 1 65
271 64 $file->text->add($self->process_page_num_text, align => $self->show_page_num);
272 64 }
273 3 }
274 3 ▶ class Page::Component::Cover {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
275 3 has file (is => 'rw', type => Object);
276 factory cover (Object $file, Map %args) {
277 1 ▶ $args{$_} //= $file->page->$_ for qw/x y w h padding oh ow column columns row rows num page_size/;
Subroutine __ANON__: called CC=4 SCAR=14.3
Subroutine cover: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::cover", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
278 1 ▶ return $class->new(
Condition66%2/3
$args{$_} //= $file->page->$_
l!l&&r!l&&!r
3100
MC/DC0%0/2
$args{$_} //= $file->page->$_
$args{$_} $file->page->$_
Truth table66%2/3
A //= B
A= $args{$_}B= $file->page->$_
ABresult
1X1
011
000
279 1 file => $file,
280 parent => $file->page,
281 current => $file->page->current,
282 %args
283 );
284 3 }
285 3 method end {
286 1 ▶ $self->file->page($self->parent);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine end: called CC=1 SCAR=0.2
Pod undocumented
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
287 1 $self->file->add_page(force_new_page => 1);
288 1 return $self->file;
289 3 }
290 3 around add {
291 2 ▶ $self->file->page($self);
Subroutine __ANON__: called CC=2 SCAR=7.1
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
200
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
292 2 $self->$next(@_);
293 2 return $self->file;
294 2 }
295 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
296 3 ▶ class Page::Component::Header {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
297 factory header (Map %args) {
298 36 ▶ $args{$_} //= $args{parent}->$_ for qw/num page_size/;
Subroutine __ANON__: called CC=10 SCAR=23.3
Subroutine header: called CC=3 SCAR=11.1
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 36 0 36
ref $tmp eq 'HASH' ? : 0 2 2
Condition66%2/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::header", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::header", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::header", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::header", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
299 36 ▶ $args{x} //= 0;
Condition33%1/3
$args{$_} //= $args{"parent"}->$_
l!l&&r!l&&!r
0720
MC/DC0%0/2
$args{$_} //= $args{"parent"}->$_
$args{$_} $args{"parent"}->$_
Truth table33%1/3
A //= B
A= $args{$_}B= $args{"parent"}->$_
ABresult
1X1
011
000
300 36 ▶ $args{w} //= $args{parent}->ow;
Condition100%2/2
$args{"x"} //= 0
l!l
342
MC/DC100%1/1
$args{"x"} //= 0
$args{"x"}
Truth table100%2/2
A
A= $args{"x"}
Aresult
11
00
301 36 ▶ $args{y} //= $args{parent}->oh + ($args{parent}->padding/mm);
Condition66%2/3
$args{"w"} //= $args{"parent"}->ow
l!l&&r!l&&!r
3420
MC/DC0%0/2
$args{"w"} //= $args{"parent"}->ow
$args{"w"} $args{"parent"}->ow
Truth table66%2/3
A //= B
A= $args{"w"}B= $args{"parent"}->ow
ABresult
1X1
011
000
302 36 ▶ $args{h} //= 10/mm;
Condition100%2/2
$args{"y"} //= $args{"parent"}->oh + $args{"parent"}->padding / "0.352777777777778"
l!l
342
MC/DC100%1/1
$args{"y"} //= $args{"parent"}->oh + $args{"parent"}->padding / "0.352777777777778"
$args{"y"}
Truth table100%2/2
A
A= $args{"y"}
Aresult
11
00
303 36 ▶ $args{padding} //= 10;
Condition100%2/2
$args{"h"} //= "28.3464566929134"
l!l
342
MC/DC100%1/1
$args{"h"} //= "28.3464566929134"
$args{"h"}
Truth table100%2/2
A
A= $args{"h"}
Aresult
11
00
304 36 ▶ my $head = $class->new(onsave_cbs => [], %args);
Condition100%2/2
$args{"padding"} //= 10
l!l
342
MC/DC100%1/1
$args{"padding"} //= 10
$args{"padding"}
Truth table100%2/2
A
A= $args{"padding"}
Aresult
11
00
305 36 $head->activate if !!$head->active;
306 36 ▶ return $head;
Branch: 1 branch
BranchTrueFalseTotal
unless not $head->active 31 5 36
307 3 }
308 3 before activate {
309 32 ▶ $self->parent->y($self->parent->oh - $self->h);
Subroutine __ANON__: called CC=2 SCAR=7.4
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
3200
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
310 32 }
311 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
312 3 ▶ class Page::Component::Footer {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
313 factory footer (Map %args) {
314 36 ▶ $args{$_} //= $args{parent}->$_ for qw/num page_size/;
Subroutine __ANON__: called CC=9 SCAR=22.3
Subroutine footer: called CC=3 SCAR=11.1
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 36 0 36
ref $tmp eq 'HASH' ? : 0 2 2
Condition66%2/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::footer", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::footer", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::footer", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::footer", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
315 36 ▶ $args{x} //= 0;
Condition33%1/3
$args{$_} //= $args{"parent"}->$_
l!l&&r!l&&!r
0720
MC/DC0%0/2
$args{$_} //= $args{"parent"}->$_
$args{$_} $args{"parent"}->$_
Truth table33%1/3
A //= B
A= $args{$_}B= $args{"parent"}->$_
ABresult
1X1
011
000
316 36 ▶ $args{w} //= $args{parent}->ow;
Condition100%2/2
$args{"x"} //= 0
l!l
342
MC/DC100%1/1
$args{"x"} //= 0
$args{"x"}
Truth table100%2/2
A
A= $args{"x"}
Aresult
11
00
317 36 ▶ $args{y} //= (5/mm);
Condition66%2/3
$args{"w"} //= $args{"parent"}->ow
l!l&&r!l&&!r
3420
MC/DC0%0/2
$args{"w"} //= $args{"parent"}->ow
$args{"w"} $args{"parent"}->ow
Truth table66%2/3
A //= B
A= $args{"w"}B= $args{"parent"}->ow
ABresult
1X1
011
000
318 36 ▶ $args{h} //= (10/mm);
Condition100%2/2
$args{"y"} //= "14.1732283464567"
l!l
342
MC/DC100%1/1
$args{"y"} //= "14.1732283464567"
$args{"y"}
Truth table100%2/2
A
A= $args{"y"}
Aresult
11
00
319 36 ▶ $args{padding} //= 10;
Condition100%2/2
$args{"h"} //= "28.3464566929134"
l!l
342
MC/DC100%1/1
$args{"h"} //= "28.3464566929134"
$args{"h"}
Truth table100%2/2
A
A= $args{"h"}
Aresult
11
00
320 36 ▶ return $class->new(onsave_cbs => [], %args);
Condition100%2/2
$args{"padding"} //= 10
l!l
342
MC/DC100%1/1
$args{"padding"} //= 10
$args{"padding"}
Truth table100%2/2
A
A= $args{"padding"}
Aresult
11
00
321 36 }
322 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
323 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
324 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
325 3 ▶ role Utils {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.1
Subroutine __ANON__: called CC=1 SCAR=0.1
326 3 has full (is => 'rw', type => Bool);
327 3 has padding (is => 'rw', type => Num);
328 3 has margin_top (is => 'rw', type => Num);
329 3 has margin_bottom (is => 'rw', type => Num);
330 3 has h_offset (is => 'rw', type => Num);
331 method add_padding (Num $padding) {
332 0 ▶ $self->padding($self->padding + $padding);
Subroutine __ANON__: not called CC=2 SCAR=16.9
Subroutine add_padding: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::add_padding", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::add_padding", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::add_padding", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::add_padding", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
333 0 }
334 3 method set_position (Num $x, Num $y, Num $w, Num $h) {
335 167 ▶ my $page = $self->can('file') ? $self->file->page : $self;
Subroutine __ANON__: called CC=3 SCAR=11.1
Subroutine set_position: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
16700
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
16520
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
336 167 ▶ $page->x($x);
Branch: 1 branch
BranchTrueFalseTotal
$self->can('file') ? : 1 166 167
337 167 $page->y($y);
338 167 $page->w($w);
339 167 $page->h($h);
340 167 return ($x, $y, $w, $h);
341 3 }
342 3 method parse_position (ArrayRef $position, Bool $xy?) {
343 735 ▶ my ($x, $y, $w, $h) = map {
Subroutine __ANON__: called CC=24 SCAR=32.2
Subroutine parse_position: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
73500
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::parse_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
73320
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::parse_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::parse_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::parse_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
344 $_ =~ m/[^\d\.]/ ? $_ : $_/mm
345 144 ▶ } @{$position};
Branch: 1 branch
BranchTrueFalseTotal
$_ =~ /[^\d\.]/u ? : 0 144 144
346 735 my $file = $self->can('file');
347 735 my $page = $file ? $self->file->page : $self;
348 735 ▶ my $sp = $self->padding/mm;
Branch: 1 branch
BranchTrueFalseTotal
$file ? : 596 139 735
349 735 my $pp = $page->padding/mm;
350 735 $x //= ($page->x + $sp);
351 735 ▶ $y //= ($page->y - $sp);
Condition100%2/2
$x //= $page->x + $sp
l!l
36699
MC/DC100%1/1
$x //= $page->x + $sp
$x
Truth table100%2/2
A
A= $x
Aresult
11
00
352 735 ▶ $w //= ($page->w - $sp);
Condition100%2/2
$y //= $page->y - $sp
l!l
36699
MC/DC100%1/1
$y //= $page->y - $sp
$y
Truth table100%2/2
A
A= $y
Aresult
11
00
353 735 ▶ $h //= ($page->oh - ($page->oh - $y) - ($sp + $pp));
Condition100%2/2
$w //= $page->w - $sp
l!l
36699
MC/DC100%1/1
$w //= $page->w - $sp
$w
Truth table100%2/2
A
A= $w
Aresult
11
00
354 735 ▶ $h = ((!$page->footer || !$page->footer->active) ? $h : $page->footer->saving ? ($h + $sp + $pp) : $h > $page->footer->h ? ($h - $page->footer->h) : 0);
Condition100%2/2
$h //= $page->oh - ($page->oh - $y) - ($sp + $pp)
l!l
36699
MC/DC100%1/1
$h //= $page->oh - ($page->oh - $y) - ($sp + $pp)
$h
Truth table100%2/2
A
A= $h
Aresult
11
00
355 735 ▶ if ($file) {
Branch: 3 branches
BranchTrueFalseTotal
!($page->footer && $page->footer->active) ? : 14 721 735
$page->footer->saving ? : 64 657 721
$h > $page->footer->h ? : 651 6 657
Condition100%3/3
$page->footer && $page->footer->active
!ll&&!rl&&r
212721
MC/DC100%2/2
$page->footer && $page->footer->active
$page->footer $page->footer->active
Truth table100%3/3
A && B
A= $page->footerB= $page->footer->active
ABresult
0X0
100
111
356 735 ▶ if ($page->columns > 1 && !$self->full) {
Branch: 1 branch
BranchTrueFalseTotal
if ($file) 596 139 735
357 596 ▶ $w = ($page->w / $page->columns);
Branch: 1 branch
BranchTrueFalseTotal
if ($page->columns > 1 and not $self->full) 429 167 596
Condition100%3/3
$page->columns > 1 and not $self->full
!ll&&!rl&&r
13433429
MC/DC100%2/2
$page->columns > 1 and not $self->full
$page->columns > 1 not $self->full
Truth table100%3/3
A and not(B)
A= $page->columns > 1B= not $self->full
ABresult
0X0
100
111
358 429 $x += ($w * ($page->column - 1));
359 429 $w -= $sp;
360 429 }
361 $w -= ($pp + $sp);
362 596 if ($page->rows > 1 && !$self->full) {
363 596 ▶ my $hh = $page->header && $page->header->active ? $page->header->h :0;
Branch: 1 branch
BranchTrueFalseTotal
if ($page->rows > 1 and not $self->full) 429 167 596
Condition100%3/3
$page->rows > 1 and not $self->full
!ll&&!rl&&r
13433429
MC/DC100%2/2
$page->rows > 1 and not $self->full
$page->rows > 1 not $self->full
Truth table100%3/3
A and not(B)
A= $page->rows > 1B= not $self->full
ABresult
0X0
100
111
364 429 ▶ my $fh = $page->footer && $page->footer->active ? $page->footer->h : 0;
Branch: 1 branch
BranchTrueFalseTotal
$page->header && $page->header->active ? : 429 0 429
Condition33%1/3
$page->header and $page->header->active
!ll&&!rl&&r
00429
MC/DC0%0/2
$page->header and $page->header->active
$page->header $page->header->active
Truth table33%1/3
A and B
A= $page->headerB= $page->header->active
ABresult
0X0
100
111
365 429 ▶ $h = ($page->h + ($pp*2)) / $page->rows;
Branch: 1 branch
BranchTrueFalseTotal
$page->footer && $page->footer->active ? : 429 0 429
Condition33%1/3
$page->footer and $page->footer->active
!ll&&!rl&&r
00429
MC/DC0%0/2
$page->footer and $page->footer->active
$page->footer $page->footer->active
Truth table33%1/3
A and B
A= $page->footerB= $page->footer->active
ABresult
0X0
100
111
366 429 $h -= ((($page->h + ($pp*3)) - $y) - ($h * ($page->row - 1)));
367 429 $h -= $fh;
368 429 if ($page->row > 1 && $page->y == $page->row_y) {
369 429 ▶ $y -= $pp;
Branch: 1 branch
BranchTrueFalseTotal
if ($page->row > 1 and $page->y == $page->row_y) 63 366 429
Condition100%3/3
$page->row > 1 and $page->y == $page->row_y
!ll&&!rl&&r
24012663
MC/DC100%2/2
$page->row > 1 and $page->y == $page->row_y
$page->row > 1 $page->y == $page->row_y
Truth table100%3/3
A and B
A= $page->row > 1B= $page->y == $page->row_y
ABresult
0X0
100
111
370 63 $h -= $pp;
371 63 }
372 }
373 $h -= $sp;
374 596 }
375 return $xy ? ($x, $y) : ($x, $y, $w, $h);
376 3 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
$xy ? : 0 735 735
377 3 method set_y (Num $y) {
378 435 ▶ $y -= ($self->margin_bottom/mm) if $self->margin_bottom;
Subroutine __ANON__: called CC=4 SCAR=14.4
Subroutine set_y: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
43500
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_y", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
43410
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_y", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_y", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_y", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
379 435 ▶ my $page = $self->can('file') ? $self->file->page : $self;
Branch: 1 branch
BranchTrueFalseTotal
if $self->margin_bottom 0 435 435
380 435 ▶ return $page->y($y);
Branch: 1 branch
BranchTrueFalseTotal
$self->can('file') ? : 435 0 435
381 3 }
382 3 method valid_colour (Str $css) {
383 111 ▶ return Colouring::In->new($css)->toHEX(1);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine valid_colour: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
11100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::valid_colour", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10920
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::valid_colour", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::valid_colour", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::valid_colour", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
384 3 }
385 3 method set_attrs (Map %args) {
386 804 ▶ $self->can($_) && $self->$_($args{$_}) for keys %args;
Subroutine __ANON__: called CC=5 SCAR=16.5
Subroutine set_attrs: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 804 0 804
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
80400
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
80220
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Utils", "Mxpress::PDF::Utils::set_attrs", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
387 3 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
$self->can($_) and $self->$_($args{$_}) 271 204 475
388 3 method _recurse_find {
389 92 ▶ my ($self, $check, $recurse, $val, @items) = @_;
Subroutine __ANON__: called CC=8 SCAR=21.3
Subroutine _recurse_find: called CC=1 SCAR=0.2
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
9200
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
390 92 for (@items) {
391 92 if (defined $_->$check && $_->$check =~ $val) {
392 99 ▶ return $_;
Branch: 2 branches
BranchTrueFalseTotal
if (defined $_->$check and $_->$check =~ /$val/u) { } 67 32 99
elsif ($_->$recurse and scalar @{$_->$recurse;}) { } 23 9 32
Condition66%2/3
defined $_->$check and $_->$check =~ /$val/u
!ll&&!rl&&r
03267
MC/DC50%1/2
defined $_->$check and $_->$check =~ /$val/u
defined $_->$check $_->$check =~ /$val/u
Truth table66%2/3
A and B
A= defined $_->$checkB= $_->$check =~ /$val/u
ABresult
0X0
100
111
393 67 } elsif ($_->$recurse && scalar @{$_->$recurse}) {
394 32 ▶ my $val = $self->_recurse_find($check, $recurse, $val, reverse @{$_->$recurse});
Condition50%1/2
$_->$recurse and scalar @{$_->$recurse;}
!ll
032
MC/DC0%0/1
$_->$recurse and scalar @{$_->$recurse;}
$_->$recurse
Truth table50%1/2
A
A= $_->$recurse
Aresult
00
11
395 23 return $val if $val;
396 23 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
if $val 23 0 23
397 }
398 return undef;
399 2 }
400 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
401 3 ▶ class Plugin {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=1.0
Subroutine __ANON__: called CC=1 SCAR=0.6
402 3 with Utils;
403 3 has file (is => 'rw', type => Object);
404 3 has position (is => 'rw', type => ArrayRef);
405 3 ▶ class Plugin::Font {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
406 3 has colour (is => 'rw', type => Str);
407 3 has size (is => 'rw', type => Num);
408 3 has family (is => 'rw', type => Str);
409 3 has loaded (is => 'rw', type => HashRef);
410 3 has line_height ( is => 'rw', type => Num);
411 factory font (Object $file, Map %args) {
412 107 ▶ return $class->new(
Subroutine __ANON__: called CC=4 SCAR=14.1
Subroutine font: called CC=3 SCAR=11.1
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 107 0 107
ref $tmp eq 'HASH' ? : 0 1 1
Condition66%2/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10610
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::font", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
413 file => $file,
414 colour => $file->page->valid_colour($args{colour} || '#000'),
415 size => 9,
416 line_height => $args{size} || 9,
417 107 ▶ family => 'Times',
Condition75%3/4
$args{'colour'} || '#000'
l!l
1070
$args{'size'} || 9
l!l
3104
MC/DC0%0/1
$args{'colour'} || '#000'
$args{'colour'}
MC/DC100%1/1
$args{'size'} || 9
$args{'size'}
Truth table50%1/2
A
A= $args{'colour'}
Aresult
11
00
Truth table100%2/2
A
A= $args{'size'}
Aresult
11
00
418 %args
419 );
420 3 }
421 3 method load () { $self->find($self->family); }
422 3 ▶ method find (Str $family, Str $enc?) {
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine load: called CC=3 SCAR=11.3
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
55900
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::load", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
55810
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::load", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::load", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::load", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
423 559 ▶ my $loaded = $self->loaded;
Subroutine __ANON__: called CC=4 SCAR=14.1
Subroutine find: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
55900
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::find", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
55810
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::find", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::find", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Font", "Mxpress::PDF::Plugin::Font::find", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
424 559 unless ($loaded->{$family}) {
425 559 ▶ $loaded->{$family} = $self->file->pdf->corefont($family, -encoding => $enc || 'latin1');
Branch: 1 branch
BranchTrueFalseTotal
unless ($loaded->{$family}) 107 452 559
426 107 ▶ $self->loaded($loaded);
Condition50%1/2
$enc || 'latin1'
l!l
0107
MC/DC0%0/1
$enc || 'latin1'
$enc
Truth table50%1/2
A
A= $enc
Aresult
11
00
427 107 }
428 return $loaded->{$family};
429 559 }
430 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
431 3 ▶ class Plugin::Shape {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=1.9
Subroutine __ANON__: called CC=1 SCAR=1.5
432 3 has fill_colour ( is => 'rw', type => Str );
433 3 has radius ( is => 'rw', type => Num );
434 3 has start (is => 'rw', type => Num);
435 3 has end (is => 'rw', type => Num);
436 method generic_new (Object $file, Map %args) {
437 2 ▶ return $class->new(
Subroutine __ANON__: called CC=5 SCAR=17.5
Subroutine generic_new: called CC=3 SCAR=11.7
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 2 0 2
ref $tmp eq 'HASH' ? : 0 2 2
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
020
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
438 padding => $args{padding} || 0,
439 %args,
440 file => $file,
441 fill_colour => $file->page->valid_colour($args{fill_colour} || '#fff'),
442 2 ▶ );
Condition50%2/4
$args{'padding'} || 0
l!l
02
$args{'fill_colour'} || '#fff'
l!l
02
MC/DC0%0/1
$args{'padding'} || 0
$args{'padding'}
MC/DC0%0/1
$args{'fill_colour'} || '#fff'
$args{'fill_colour'}
Truth table50%1/2
A
A= $args{'padding'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'fill_colour'}
Aresult
11
00
443 3 }
444 3 method add (Map %args) {
445 36 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=3 SCAR=11.2
Subroutine add: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 36 0 36
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
3600
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape", "Mxpress::PDF::Plugin::Shape::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
446 36 my $shape = $self->file->page->current->gfx;
447 36 $self->shape($shape);
448 36 return $self->file;
449 3 }
450 3 ▶ class Plugin::Shape::Line {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.0
Subroutine __ANON__: called CC=1 SCAR=3.6
451 3 has end_position (is => 'rw');
452 3 has type (is => 'rw', type => Str);
453 3 has dash (is => 'rw', type => ArrayRef);
454 3 has join (is => 'rw', type => Num);
455 factory line (Object $file, Map %args) {
456 0 ▶ $args{line_join} ||= 2;
Subroutine __ANON__: not called CC=4 SCAR=29.0
Subroutine line: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::line", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
457 0 ▶ $args{line_type} ||= 'solid';
Condition0%0/2
$args{"line_join"} ||= 2
l!l
00
MC/DC0%0/1
$args{"line_join"} ||= 2
$args{"line_join"}
Truth table0%0/2
A
A= $args{"line_join"}
Aresult
11
00
458 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"line_type"} ||= "solid"
l!l
00
MC/DC0%0/1
$args{"line_type"} ||= "solid"
$args{"line_type"}
Truth table0%0/2
A
A= $args{"line_type"}
Aresult
11
00
459 0 }
460 3 method shape (Object $shape) {
461 0 ▶ $shape->strokecolor($self->fill_colour);
Subroutine __ANON__: not called CC=7 SCAR=40.3
Subroutine shape: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line", "Mxpress::PDF::Plugin::Shape::Line::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line", "Mxpress::PDF::Plugin::Shape::Line::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line", "Mxpress::PDF::Plugin::Shape::Line::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line", "Mxpress::PDF::Plugin::Shape::Line::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
462 0 my ($x, $y, $w, $h) = $self->parse_position($self->position || []);
463 0 ▶ $shape->move($x, $y);
Condition0%0/2
$self->position || []
l!l
00
MC/DC0%0/1
$self->position || []
$self->position
Truth table0%0/2
A
A= $self->position
Aresult
11
00
464 0 ($x, $y) = $self->end_position ? $self->parse_position($self->end_position) : ($x + $w, $y);
465 0 ▶ if ($self->dash) {
Branch: 1 branch
BranchTrueFalseTotal
$self->end_position ? : 0 0 0
466 0 ▶ $shape->linedash(@{$self->dash});
Branch: 3 branches
BranchTrueFalseTotal
if ($self->dash) { } 0 0 0
elsif ($self->type eq 'dots') { } 0 0 0
elsif ($self->type eq 'dashed') { } 0 0 0
467 0 } elsif ($self->type eq 'dots') {
468 $shape->linedash(1, 1);
469 0 } elsif ($self->type eq 'dashed') {
470 $shape->linedash(5, 5);
471 0 }
472 $shape->linejoin($self->join);
473 0 $shape->line($x, $y);
474 0 $shape->stroke;
475 0 }
476 3 ▶ class Plugin::Shape::Line::Border {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: called CC=1 SCAR=2.6
477 3 has border_top (is => 'rw', type => ArrayRef);
478 3 has active (is => 'rw');
479 factory border (Object $file, Map %args) {
480 2 ▶ return $class->new(
Subroutine __ANON__: called CC=3 SCAR=11.4
Subroutine border: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 2 0 2
ref $tmp eq 'HASH' ? : 0 2 2
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
020
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::border", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
481 file => $file,
482 padding => 0,
483 fill_colour => $file->page->valid_colour($args{fill_colour} || '#fff'),
484 2 ▶ %args
Condition50%1/2
$args{'fill_colour'} || '#fff'
l!l
02
MC/DC0%0/1
$args{'fill_colour'} || '#fff'
$args{'fill_colour'}
Truth table50%1/2
A
A= $args{'fill_colour'}
Aresult
11
00
485 );
486 3 }
487 3 method start (Map %args) {
488 0 ▶ if (!$args{border_top}) {
Subroutine __ANON__: not called CC=5 SCAR=33.3
Subroutine start: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::start", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::start", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::start", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::start", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
489 0 ▶ my $y = $self->file->page->y*mm;
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"border_top"}) 0 0 0
490 0 if ($self->file->page->row > 1) {
491 0 ▶ $y -= $self->file->page->padding * ($self->file->page->row - 1);
Branch: 1 branch
BranchTrueFalseTotal
if ($self->file->page->row > 1) 0 0 0
492 0 }
493 $args{border_top} = [
494 $self->file->page->x*mm,
495 0 $y,
496 $self->file->page->w*mm
497 ];
498 }
499 $args{active} = 1;
500 0 $self->set_attrs(%args);
501 0 return $self->file;
502 0 }
503 3 method end (Map %args) {
504 0 ▶ $args{active} = 0;
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine end: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Line::Border", "Mxpress::PDF::Plugin::Shape::Line::Border::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
505 0 $self->set_attrs(%args);
506 0 my $tx = $self->border_top->[0];
507 0 my $ty = $self->border_top->[1];
508 0 my ($bx, $by, $w) = map { $_*mm } $self->parse_position([]);
509 0 $self->add(
510 0 position => [$tx, $ty],
511 end_position => [$tx + $w, $ty]
512 );
513
514 $self->add(
515 0 position => [$tx, $by],
516 end_position => [$tx + $w, $by]
517 );
518  
519 $self->add(
520 0 position => [$tx, $ty],
521 end_position => [$tx, $by],
522 );
523
524 my $r = $tx + $w;
525 0 $self->add(
526 0 position => [$r, $ty],
527 end_position => [$r, $by],
528 );
529
530 return $self->file;
531 0 }
532 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
533  
534 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
535 3 ▶ class Plugin::Shape::Box {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
536 factory box (Object $file, Map %args) {
537 2 ▶ return $class->generic_new($file, %args);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine box: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 2 0 2
ref $tmp eq 'HASH' ? : 0 2 2
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
020
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::box", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
538 3 }
539 3 method shape (Object $shape) {
540 36 ▶ my $box = $shape->rect(
Subroutine __ANON__: called CC=3 SCAR=11.3
Subroutine shape: called CC=3 SCAR=11.4
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 2 2
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
3600
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Box", "Mxpress::PDF::Plugin::Shape::Box::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
3420
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Box", "Mxpress::PDF::Plugin::Shape::Box::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Box", "Mxpress::PDF::Plugin::Shape::Box::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Box", "Mxpress::PDF::Plugin::Shape::Box::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
541 36 ▶ $self->parse_position(
Condition50%1/2
$self->position || [0, 0, $self->file->page->w, $self->file->page->h]
l!l
036
MC/DC0%0/1
$self->position || [0, 0, $self->file->page->w, $self->file->page->h]
$self->position
Truth table50%1/2
A
A= $self->position
Aresult
11
00
542 $self->position || [0, 0, $self->file->page->w, $self->file->page->h]
543 )
544 );
545 $box->fillcolor($self->fill_colour);
546 36 $box->fill;
547 36 }
548 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
549 3 ▶ class Plugin::Shape::Circle {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.6
Subroutine __ANON__: called CC=1 SCAR=3.6
550 factory circle (Object $file, Map %args) {
551 0 ▶ $args{radius} ||= 50;
Subroutine __ANON__: not called CC=3 SCAR=23.8
Subroutine circle: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::circle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
552 0 ▶ return $class->generic_new($file, %args);
Condition0%0/2
$args{"radius"} ||= 50
l!l
00
MC/DC0%0/1
$args{"radius"} ||= 50
$args{"radius"}
Truth table0%0/2
A
A= $args{"radius"}
Aresult
11
00
553 0 }
554 3 method shape (Object $shape) {
555 0 ▶ my ($x, $y, $r) = $self->parse_position(
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine shape: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Circle", "Mxpress::PDF::Plugin::Shape::Circle::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Circle", "Mxpress::PDF::Plugin::Shape::Circle::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Circle", "Mxpress::PDF::Plugin::Shape::Circle::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Circle", "Mxpress::PDF::Plugin::Shape::Circle::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
556 0 ▶ $self->position || [
Condition0%0/2
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->radius, $self->file->page->y * 0.3527777777777777457 - $self->radius]
l!l
00
MC/DC0%0/1
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->radius, $self->file->page->y * 0.3527777777777777457 - $self->radius]
$self->position
Truth table0%0/2
A
A= $self->position
Aresult
11
00
557 ($self->file->page->x*mm) + $self->radius,
558 ($self->file->page->y*mm) - $self->radius,
559 ]
560 );
561 my $circle = $shape->circle(
562 0 $x, $y, $self->radius/mm
563 );
564 $circle->fillcolor($self->fill_colour);
565 0 $circle->fill;
566 0 }
567 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
568 3 ▶ class Plugin::Shape::Pie {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=4.1
Subroutine __ANON__: called CC=1 SCAR=4.1
569 factory pie (Object $file, Map %args) {
570 0 ▶ $args{radius} ||= 50;
Subroutine __ANON__: not called CC=5 SCAR=33.1
Subroutine pie: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::pie", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
571 0 ▶ $args{start} ||= 180;
Condition0%0/2
$args{"radius"} ||= 50
l!l
00
MC/DC0%0/1
$args{"radius"} ||= 50
$args{"radius"}
Truth table0%0/2
A
A= $args{"radius"}
Aresult
11
00
572 0 ▶ $args{end} ||= 135;
Condition0%0/2
$args{"start"} ||= 180
l!l
00
MC/DC0%0/1
$args{"start"} ||= 180
$args{"start"}
Truth table0%0/2
A
A= $args{"start"}
Aresult
11
00
573 0 ▶ return $class->generic_new($file, %args);
Condition0%0/2
$args{"end"} ||= 135
l!l
00
MC/DC0%0/1
$args{"end"} ||= 135
$args{"end"}
Truth table0%0/2
A
A= $args{"end"}
Aresult
11
00
574 0 }
575 3 method shape (Object $shape) {
576 0 ▶ my ($x, $y, $r) = $self->parse_position($self->position || [
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine shape: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Pie", "Mxpress::PDF::Plugin::Shape::Pie::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Pie", "Mxpress::PDF::Plugin::Shape::Pie::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Pie", "Mxpress::PDF::Plugin::Shape::Pie::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Pie", "Mxpress::PDF::Plugin::Shape::Pie::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
577 0 ▶ ($self->file->page->x*mm) + $self->radius,
Condition0%0/2
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->radius, $self->file->page->y * 0.3527777777777777457 - $self->radius, $self->radius]
l!l
00
MC/DC0%0/1
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->radius, $self->file->page->y * 0.3527777777777777457 - $self->radius, $self->radius]
$self->position
Truth table0%0/2
A
A= $self->position
Aresult
11
00
578 ($self->file->page->y*mm) - $self->radius,
579 $self->radius,
580 ]);
581 my $pie = $shape->pie($x, $y, $r, $r, $self->start, $self->end);
582 0 $pie->fillcolor($self->fill_colour);
583 0 $pie->fill;
584 0 }
585 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
586 3 ▶ class Plugin::Shape::Ellipse {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.9
Subroutine __ANON__: called CC=1 SCAR=3.9
587 factory ellipse (Object $file, Map %args) {
588 0 ▶ $args{start} ||= 50;
Subroutine __ANON__: not called CC=4 SCAR=29.0
Subroutine ellipse: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::ellipse", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
589 0 ▶ $args{end} ||= 100;
Condition0%0/2
$args{"start"} ||= 50
l!l
00
MC/DC0%0/1
$args{"start"} ||= 50
$args{"start"}
Truth table0%0/2
A
A= $args{"start"}
Aresult
11
00
590 0 ▶ return $class->generic_new($file, %args);
Condition0%0/2
$args{"end"} ||= 100
l!l
00
MC/DC0%0/1
$args{"end"} ||= 100
$args{"end"}
Truth table0%0/2
A
A= $args{"end"}
Aresult
11
00
591 0 }
592 3 method shape (Object $shape) {
593 0 ▶ my ($x, $y) = $self->parse_position($self->position || [
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine shape: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Ellipse", "Mxpress::PDF::Plugin::Shape::Ellipse::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Ellipse", "Mxpress::PDF::Plugin::Shape::Ellipse::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Ellipse", "Mxpress::PDF::Plugin::Shape::Ellipse::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Shape::Ellipse", "Mxpress::PDF::Plugin::Shape::Ellipse::shape", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
594 0 ▶ ($self->file->page->x*mm) + $self->start,
Condition0%0/2
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->start, $self->file->page->y * 0.3527777777777777457 - $self->end / 2]
l!l
00
MC/DC0%0/1
$self->position || [$self->file->page->x * 0.3527777777777777457 + $self->start, $self->file->page->y * 0.3527777777777777457 - $self->end / 2]
$self->position
Truth table0%0/2
A
A= $self->position
Aresult
11
00
595 ($self->file->page->y*mm) - ($self->end / 2),
596 ]);
597 my $ellipse = $shape->ellipse($x, $y, $self->start, $self->end);
598 0 $ellipse->fillcolor($self->fill_colour);
599 0 $ellipse->fill;
600 0 }
601 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
602 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
603 3 ▶ class Plugin::Text {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.5
Subroutine __ANON__: called CC=1 SCAR=0.4
604 3 has text (is => 'rw', type => Object);
605 3 has font (is => 'rw', type => Object);
606 3 has paragraph_space (is => 'rw', type => Num);
607 3 has paragraphs_to_columns (is => 'rw', type => Bool);
608 3 has first_line_indent (is => 'rw', type => Num);
609 3 has first_paragraph_indent (is => 'rw', type => Num);
610 3 has align (is => 'rw', type => Str); #enum
611 3 has margin_bottom (is => 'rw', type => Num);
612 3 has indent (is => 'rw', type => Num);
613 3 has pad (is => 'rw', type => Str);
614 3 has pad_end (is => 'rw', type => Str);
615 3 has no_space (is => 'rw', type => Bool);
616 3 has min_width (is => 'rw', type => Num);
617 3 has end_w (is => 'rw', type => Str);
618 3 has end_lw (is => 'rw', type => Str);
619 3 has concat (is => 'rw', type => Bool);
620 3 has next_page;
621 factory text (Object $file, Map %args) {
622 1 ▶ $class->generic_new($file, %args);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine text: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::text", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
623 3 }
624 3 method generic_new (Object $file, Map %args) {
625 4 ▶ return $class->new({
Subroutine __ANON__: called CC=5 SCAR=16.5
Subroutine generic_new: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 4 0 4
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
040
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
310
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::generic_new", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
626 file => $file,
627 page => $file->page,
628 4 next_page => do { method {
629 123 ▶ my $self = shift;
Subroutine __ANON__: called CC=2 SCAR=7.1
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
12300
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
630 123 $file->add_page;
631 123 return $file->page;
632 123 } },
633 4 min_width => 0,
634 padding => 0,
635 align => 'left',
636 font => $class->FACTORY->font(
637 $file,
638 %{$args{font}}
639 4 ▶ ),
Condition50%1/2
$args{'position'} || []
l!l
04
MC/DC0%0/1
$args{'position'} || []
$args{'position'}
Truth table50%1/2
A
A= $args{'position'}
Aresult
11
00
640 position => $args{position} || [],
641 no_space => 0,
642 (map {
643 defined $args{$_} ? ( $_ => $args{$_} ) : ()
644 4 ▶ } qw/
Branch: 1 branch
BranchTrueFalseTotal
defined $args{$_} ? : 2 54 56
645 align margin_bottom margin_top indent align padding pad no_space pad_end first_line_indent
646 first_paragraph_indent paragrah_space paragraphs_to_columns min_width
647 /)
648 });
649 3 }
650 3 method add (Str $string, Map %args) {
651 559 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=45 SCAR=48.5
Subroutine add: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 559 0 559
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
55900
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
55810
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
652 559 my ($xpos, $ypos);
653 559 my @paragraphs = split /\n/, $string;
654 559 my $columns = $self->file->page->columns;
655 559 my $page_column;
656 559 if ($columns == 1 && $self->paragraphs_to_columns) {
657 559 ▶ @paragraphs = grep { $_ =~ m/\w/ } @paragraphs;
Branch: 1 branch
BranchTrueFalseTotal
if ($columns == 1 and $self->paragraphs_to_columns) 0 559 559
Condition66%2/3
$columns == 1 and $self->paragraphs_to_columns
!ll&&!rl&&r
4291300
MC/DC0%0/2
$columns == 1 and $self->paragraphs_to_columns
$columns == 1 $self->paragraphs_to_columns
Truth table66%2/3
A and B
A= $columns == 1B= $self->paragraphs_to_columns
ABresult
0X0
100
111
658 0 $self->file->page->columns(scalar grep { ($_ =~ m/\w/) } @paragraphs);
659 0 $page_column = 1;
660 0 }
661 my $text = $self->text($self->file->page->current->text);
662 559 $text->font( $self->font->load, $self->font->size/pt );
663 559 $text->fillcolor( $self->font->colour );
664 559 my ($total_width, $space_width, %width) = $self->_calculate_widths($string, $text);
665 559 my ($l, $x, $y, $w, $h) = (
666 559 $self->font->line_height/pt,
667 $self->parse_position($self->position)
668 );
669 $ypos = $y - $l;
670 559 my ($fl, $fp, @paragraph) = (1, 1, split ( / /, shift(@paragraphs) || '' ));
671 559 ▶ # while we have enough height to add a new line
Condition50%1/2
shift @paragraphs || ''
l!l
5590
MC/DC0%0/1
shift @paragraphs || ''
shift @paragraphs
Truth table50%1/2
A
A= shift @paragraphs
Aresult
11
00
672 if ($h >= 0 && $y >= 0) {
673 559 ▶ while ($ypos + 0 >= ($y - $h)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($h >= 0 and $y >= 0) 559 0 559
Condition33%1/3
$h >= 0 and $y >= 0
!ll&&!rl&&r
00559
MC/DC0%0/2
$h >= 0 and $y >= 0
$h >= 0 $y >= 0
Truth table33%1/3
A and B
A= $h >= 0B= $y >= 0
ABresult
0X0
100
111
674 559 ▶ unless (scalar @paragraph) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ypos + 0 >= $y - $h) 5108 125 5233
675 5108 ▶ last unless scalar @paragraphs;
Branch: 1 branch
BranchTrueFalseTotal
unless (scalar @paragraph) 434 4674 5108
676 434 ▶ @paragraph = split( / /, shift(@paragraphs) );
Branch: 1 branch
BranchTrueFalseTotal
unless scalar @paragraphs 434 0 434
677 0 if ($page_column) {
678 0 ▶ $page_column++;
Branch: 1 branch
BranchTrueFalseTotal
if ($page_column) 0 0 0
679 0 $x += 50/mm;
680 0 $ypos = $y;
681 0 }
682 $ypos -= $l;
683 0 $ypos -= ($self->paragraph_space/mm) if $self->paragraph_space;
684 0 ▶ last unless $ypos >= ($y - $h);
Branch: 1 branch
BranchTrueFalseTotal
if $self->paragraph_space 0 0 0
685 0 ▶ ($fl, $fp) = (1, 0);
Branch: 1 branch
BranchTrueFalseTotal
unless $ypos >= $y - $h 0 0 0
686 0 }
687 my ($xpos, $lw, $line_width, @line) = ($x, $w, 0);
688 4674 if (!!$self->concat) {
689 4674 ▶ $self->concat(!!0);
Branch: 1 branch
BranchTrueFalseTotal
if (not !$self->concat) { } 0 4674 4674
690 0 $xpos = $self->end_w + $text->advancewidth(' ');
691 0 $ypos = $y;
692 0 $lw = $self->end_lw - $text->advancewidth(' ');
693 0 } else {
694 ($xpos, $lw) = $self->_set_indent($xpos, $lw, $fl, $fp);
695 4674 }
696 while (@paragraph and ($line_width + (scalar(@line) * $space_width) + ($width{$paragraph[0]}||0)) < $lw) {
697 4674 ▶ $line_width += $width{$paragraph[0]} || 0;
Branch: 1 branch
BranchTrueFalseTotal
if (@paragraph and $line_width + scalar(@line) * $space_width + ($width{$paragraph[0]} || 0) < $lw) 48559 4674 53233
Condition80%4/5
@paragraph and $line_width + scalar(@line) * $space_width + ($width{$paragraph[0]} || 0) < $lw
!ll&&!rl&&r
434424048559
$width{$paragraph[0]} || 0
l!l
527990
MC/DC100%2/2
@paragraph and $line_width + scalar(@line) * $space_width + ($width{$paragraph[0]} || 0) < $lw
@paragraph $line_width + scalar(@line) * $space_width + ($width{$paragraph[0]} || 0) < $lw
MC/DC0%0/1
$width{$paragraph[0]} || 0
$width{$paragraph[0]}
Truth table100%3/3
A and B
A= @paragraphB= $line_width + scalar(@line) * $space_width + ($width{$paragraph[0]} || 0) < $lw
ABresult
0X0
100
111
Truth table50%1/2
A
A= $width{$paragraph[0]}
Aresult
11
00
698 48559 ▶ push @line, shift(@paragraph);
Condition50%1/2
$width{$paragraph[0]} || 0
l!l
485590
MC/DC0%0/1
$width{$paragraph[0]} || 0
$width{$paragraph[0]}
Truth table50%1/2
A
A= $width{$paragraph[0]}
Aresult
11
00
699 48559 }
700 if (!@line && @paragraph) {
701 4674 ▶ my $temp = shift(@paragraph);
Branch: 1 branch
BranchTrueFalseTotal
if (not @line and @paragraph) 0 4674 4674
Condition33%1/3
not @line and @paragraph
!ll&&!rl&&r
467400
MC/DC0%0/2
not @line and @paragraph
not @line @paragraph
Truth table33%1/3
not(A) and B
A= not @lineB= @paragraph
ABresult
0X0
100
111
702 0 my @letters = split //, $temp;
703 0 my ($wid, $lin) = (0, '');
704 0 while ($wid < $lw) {
705 0 ▶ my $letter = shift @letters;
Branch: 1 branch
BranchTrueFalseTotal
if ($wid < $lw) 0 0 0
706 0 $wid += $text->advancewidth($letter);
707 0 $lin .= $letter;
708 0 }
709 $width{$lin} = $wid;
710 0 my $rest = join '', @letters;
711 0 $width{$rest} = $text->advancewidth($rest);
712 0 $line_width += $wid;
713 0 push @line, $lin;
714 0 unshift(@paragraph, $rest);
715 0 }
716 my ($wordspace, $align);
717 4674 if ($self->align eq 'fulljustify' or $self->align eq 'justify' and @paragraph) {
718 4674 ▶ if (scalar(@line) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->align eq 'fulljustify' or $self->align eq 'justify' and @paragraph) { } 4213 461 4674
Condition83%5/6
$self->align eq "fulljustify" or $self->align eq "justify" and @paragraph
l!l&&r!l&&!r
04213461
$self->align eq "justify" and @paragraph
!ll&&!rl&&r
3591024213
MC/DC66%2/3
$self->align eq "fulljustify" or $self->align eq "justify" and @paragraph
$self->align eq "fulljustify" $self->align eq "justify" @paragraph
Truth table75%3/4
A or B and C
A= $self->align eq "fulljustify"B= $self->align eq "justify"C= @paragraph
ABCresult
1XX1
0111
00X0
0100
719 4213 ▶ @line = split( //, $line[0] );
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @line == 1) 0 4213 4213
720 0 }
721 $wordspace = ($lw - $line_width) / (scalar(@line) - 1);
722 4213 $align = 'justify';
723 4213 } else {
724 $align = ($self->align eq 'justify') ? 'left' : $self->align;
725 461 ▶ $wordspace = $space_width;
Branch: 1 branch
BranchTrueFalseTotal
$self->align eq 'justify' ? : 102 359 461
726 461 }
727 $line_width += $wordspace * (scalar(@line) - 1);
728 4674 if ($align eq 'justify') {
729 4674 ▶ foreach my $word (@line) {
Branch: 1 branch
BranchTrueFalseTotal
if ($align eq 'justify') { } 4213 461 4674
730 4213 $text->translate($xpos, $ypos);
731 47070 $text->text($word);
732 47070 $width{$word} ||= $text->advancewidth($word);
733 47070 ▶ $xpos += ($width{$word} + $wordspace);
Condition33%1/3
$width{$word} ||= $text->advancewidth($word)
l!l&&r!l&&!r
4707000
MC/DC0%0/2
$width{$word} ||= $text->advancewidth($word)
$width{$word} $text->advancewidth($word)
Truth table33%1/3
A ||= B
A= $width{$word}B= $text->advancewidth($word)
ABresult
1X1
011
000
734 47070 }
735 } else {
736 if ($align eq 'right') {
737 461 ▶ $xpos += $lw - $line_width;
Branch: 2 branches
BranchTrueFalseTotal
if ($align eq 'right') { } 32 429 461
elsif ($align eq 'center') { } 64 365 429
738 32 } elsif ($align eq 'center') {
739 $xpos += ($lw/2) - ($line_width / 2);
740 64 }
741 $text->translate($xpos, $ypos);
742 461 my $sep = $self->no_space ? '' : ' ';
743 461 ▶ $text->text(join($sep, @line));
Branch: 1 branch
BranchTrueFalseTotal
$self->no_space ? : 0 461 461
744 461 }
745 if (@paragraph) {
746 4674 ▶ $ypos -= $l if @paragraph;
Branch: 2 branches
BranchTrueFalseTotal
if (@paragraph) { } 4240 434 4674
elsif ($self->pad and $line_width < $lw) { } 101 666 767
747 4240 ▶ } elsif ($self->pad && $line_width < $lw) {
Branch: 1 branch
BranchTrueFalseTotal
if @paragraph 4240 0 4240
748 ▶ my $mw = $self->min_width ? $self->min_width/mm : 0;
Condition66%2/3
$self->pad and $line_width < $lw
!ll&&!rl&&r
3330101
MC/DC50%1/2
$self->pad and $line_width < $lw
$self->pad $line_width < $lw
Truth table66%2/3
A and B
A= $self->padB= $line_width < $lw
ABresult
0X0
100
111
749 101 ▶ if ($xpos < $mw) {
Branch: 1 branch
BranchTrueFalseTotal
$self->min_width ? : 0 101 101
750 101 ▶ $line_width = $self->end_w($mw);
Branch: 1 branch
BranchTrueFalseTotal
if ($xpos < $mw) { } 0 101 101
751 0 } else {
752 $self->end_w($xpos + $line_width);
753 101 }
754 my $pad_end = $self->pad_end || '';
755 101 ▶ my $pad = sprintf ("%s%s",
Condition50%1/2
$self->pad_end || ''
l!l
1010
MC/DC0%0/1
$self->pad_end || ''
$self->pad_end
Truth table50%1/2
A
A= $self->pad_end
Aresult
11
00
756 101 $self->pad x int((
757 (((($lw + $wordspace) - $line_width) - $text->advancewidth($self->pad . $pad_end)))
758 ) / $text->advancewidth($self->pad)),
759 $pad_end
760 );
761 $text->translate($xpos + ( $lw - $text->advancewidth($pad) ), $ypos) if (!$self->no_space);
762 101 ▶ $text->text($pad);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->no_space 101 0 101
763 101 }
764 $self->end_w($xpos + $line_width);
765 4674 $self->end_lw($lw - $line_width);
766 4674 $fl = 0;
767 4674 }
768 }
769 unshift( @paragraphs, join( ' ', @paragraph ) ) if scalar(@paragraph);
770 559 ▶ if ($self->padding) {
Branch: 1 branch
BranchTrueFalseTotal
if scalar @paragraph 125 434 559
771 559 ▶ $ypos -= $self->padding/mm;
Branch: 1 branch
BranchTrueFalseTotal
if ($self->padding) 0 559 559
772 0 }
773 $self->file->page->y($ypos);
774 559 $self->file->page->columns($columns);
775 559 if (scalar @paragraphs && $self->next_page) {
776 559 ▶ my $next_page = $self->next_page->($self);
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @paragraphs and $self->next_page) 125 434 559
Condition66%2/3
scalar @paragraphs and $self->next_page
!ll&&!rl&&r
4340125
MC/DC50%1/2
scalar @paragraphs and $self->next_page
scalar @paragraphs $self->next_page
Truth table66%2/3
A and B
A= scalar @paragraphsB= $self->next_page
ABresult
0X0
100
111
777 125 return $self->add(join("\n", @paragraphs), %args);
778 125 }
779 $self->set_y($ypos);
780 434 return $self->file;
781 3 }
782 3 method _set_indent (Num $xpos, Num $w, Num $fl, Num $fp) {
783 4674 ▶ if ($fl && $self->first_line_indent) {
Subroutine __ANON__: called CC=7 SCAR=21.9
Subroutine _set_indent: called CC=3 SCAR=11.4
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
467400
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_set_indent", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
467310
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_set_indent", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_set_indent", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_set_indent", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
784 4674 ▶ $xpos += $self->first_line_indent/mm;
Branch: 3 branches
BranchTrueFalseTotal
if ($fl and $self->first_line_indent) { } 0 4674 4674
elsif ($fp and $self->first_paragraph_indent) { } 0 4674 4674
elsif ($self->indent) { } 67 4607 4674
Condition66%2/3
$fl and $self->first_line_indent
!ll&&!rl&&r
41295450
MC/DC0%0/2
$fl and $self->first_line_indent
$fl $self->first_line_indent
Truth table66%2/3
A and B
A= $flB= $self->first_line_indent
ABresult
0X0
100
111
785 0 $w -= $self->first_line_indent/mm;
786 0 } elsif ($fp && $self->first_paragraph_indent) {
787 ▶ $xpos += $self->first_paragraph_indent/mm;
Condition33%1/3
$fp and $self->first_paragraph_indent
!ll&&!rl&&r
046740
MC/DC0%0/2
$fp and $self->first_paragraph_indent
$fp $self->first_paragraph_indent
Truth table33%1/3
A and B
A= $fpB= $self->first_paragraph_indent
ABresult
0X0
100
111
788 0 $w -= $self->first_paragraph_indent/mm;
789 0 } elsif ($self->indent) {
790 $xpos += $self->indent/mm;
791 67 $w -= $self->indent/mm
792 67 }
793 return ($xpos, $w);
794 3 }
795 3 method _calculate_widths (Str $string, Object $text) {
796 559 ▶ my @words = split /\s+/, $string;
Subroutine __ANON__: called CC=5 SCAR=16.3
Subroutine _calculate_widths: called CC=3 SCAR=11.4
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
55900
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_calculate_widths", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
55810
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_calculate_widths", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_calculate_widths", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Text", "Mxpress::PDF::Plugin::Text::_calculate_widths", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
797 559 # calculate width of space
798 my $space_width = $self->no_space ? 0 : $text->advancewidth(' ');
799 559 ▶ # calculate the width of each word
Branch: 1 branch
BranchTrueFalseTotal
$self->no_space ? : 0 559 559
800 my %width = ();
801 559 my $total_width = 0;
802 559 foreach (@words) {
803 559 next if exists $width{$_};
804 85395 ▶ $width{$_} = $text->advancewidth($_);
Branch: 1 branch
BranchTrueFalseTotal
if exists $width{$_} 83310 2085 85395
805 2085 $total_width += $width{$_} + $space_width;
806 2085 }
807 return ($total_width, $space_width, %width);
808 3 }
809 3 ▶ class Plugin::Text::Title {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
810 factory title (Object $file, Map %args) {
811 1 ▶ $args{font}->{size} ||= 50/pt;
Subroutine __ANON__: called CC=4 SCAR=14.5
Subroutine title: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::title", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
812 1 ▶ $args{font}->{line_height} ||= 40/pt;
Condition50%1/2
$args{"font"}{"size"} ||= 50
l!l
01
MC/DC0%0/1
$args{"font"}{"size"} ||= 50
$args{"font"}{"size"}
Truth table50%1/2
A
A= $args{"font"}{"size"}
Aresult
11
00
813 1 ▶ $class->generic_new($file, %args);
Condition50%1/2
$args{"font"}{"line_height"} ||= 40
l!l
01
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 40
$args{"font"}{"line_height"}
Truth table50%1/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
814 1 }
815 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
816 3 ▶ class Plugin::Text::Subtitle {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
817 factory subtitle (Object $file, Map %args) {
818 1 ▶ $args{font}->{size} ||= 25;
Subroutine __ANON__: called CC=4 SCAR=14.5
Subroutine subtitle: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
819 1 ▶ $args{font}->{line_height} ||= 20;
Condition50%1/2
$args{"font"}{"size"} ||= 25
l!l
01
MC/DC0%0/1
$args{"font"}{"size"} ||= 25
$args{"font"}{"size"}
Truth table50%1/2
A
A= $args{"font"}{"size"}
Aresult
11
00
820 1 ▶ $class->generic_new($file, %args);
Condition50%1/2
$args{"font"}{"line_height"} ||= 20
l!l
01
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 20
$args{"font"}{"line_height"}
Truth table50%1/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
821 1 }
822 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
823 3 ▶ class Plugin::Text::Subsubtitle {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
824 factory subsubtitle (Object $file, Map %args) {
825 1 ▶ $args{font}->{size} ||= 20;
Subroutine __ANON__: called CC=4 SCAR=14.5
Subroutine subsubtitle: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::subsubtitle", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
826 1 ▶ $args{font}->{line_height} ||= 15;
Condition50%1/2
$args{"font"}{"size"} ||= 20
l!l
01
MC/DC0%0/1
$args{"font"}{"size"} ||= 20
$args{"font"}{"size"}
Truth table50%1/2
A
A= $args{"font"}{"size"}
Aresult
11
00
827 1 ▶ $class->generic_new($file, %args);
Condition50%1/2
$args{"font"}{"line_height"} ||= 15
l!l
01
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 15
$args{"font"}{"line_height"}
Truth table50%1/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
828 1 }
829 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
830 3 ▶ class Plugin::Text::H1 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: called CC=1 SCAR=2.6
831 factory h1 (Object $file, Map %args) {
832 0 ▶ $args{font}->{size} ||= 50/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h1: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h1", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
833 0 ▶ $args{font}->{line_height} ||= 40/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 50
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 50
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
834 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 40
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 40
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
835 0 }
836 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
837 3 ▶ class Plugin::Text::H2 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: called CC=1 SCAR=2.6
838 factory h2 (Object $file, Map %args) {
839 0 ▶ $args{font}->{size} ||= 40/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h2: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h2", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
840 0 ▶ $args{font}->{line_height} ||= 30/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 40
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 40
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
841 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 30
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 30
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
842 0 }
843 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
844 3 ▶ class Plugin::Text::H3 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: called CC=1 SCAR=2.6
845 factory h3 (Object $file, Map %args) {
846 0 ▶ $args{font}->{size} ||= 30/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h3: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h3", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
847 0 ▶ $args{font}->{line_height} ||= 20/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 30
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 30
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
848 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 20
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 20
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
849 0 }
850 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
851 3 ▶ class Plugin::Text::H4 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.6
Subroutine __ANON__: called CC=1 SCAR=2.6
852 factory h4 (Object $file, Map %args) {
853 0 ▶ $args{font}->{size} ||= 25/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h4: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h4", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
854 0 ▶ $args{font}->{line_height} ||= 15/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 25
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 25
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
855 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 15
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 15
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
856 0 }
857 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
858 3 ▶ class Plugin::Text::H5 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.8
Subroutine __ANON__: called CC=1 SCAR=2.8
859 factory h5 (Object $file, Map %args) {
860 0 ▶ $args{font}->{size} ||= 20/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h5: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h5", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
861 0 ▶ $args{font}->{line_height} ||= 15/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 20
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 20
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
862 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 15
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 15
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
863 0 }
864 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
865 3 ▶ class Plugin::Text::H6 {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=2.8
Subroutine __ANON__: called CC=1 SCAR=2.8
866 factory h6 (Object $file, Map %args) {
867 0 ▶ $args{font}->{size} ||= 15/pt;
Subroutine __ANON__: not called CC=4 SCAR=30.0
Subroutine h6: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::h6", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
868 0 ▶ $args{font}->{line_height} ||= 10/pt;
Condition0%0/2
$args{"font"}{"size"} ||= 15
l!l
00
MC/DC0%0/1
$args{"font"}{"size"} ||= 15
$args{"font"}{"size"}
Truth table0%0/2
A
A= $args{"font"}{"size"}
Aresult
11
00
869 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"font"}{"line_height"} ||= 10
l!l
00
MC/DC0%0/1
$args{"font"}{"line_height"} ||= 10
$args{"font"}{"line_height"}
Truth table0%0/2
A
A= $args{"font"}{"line_height"}
Aresult
11
00
870 0 }
871 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
872 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
873 3 ▶ class Plugin::TOC::Outline extends Plugin::Text {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
874 3 has outline (is => 'rw', type => Object);
875 3 has x (is => 'rw', type => Num);
876 3 has y (is => 'rw', type => Num);
877 3 has title (is => 'rw', type => Str);
878 3 has page (is => 'rw', type => Object);
879 3 has level (is => 'rw', type => Num);
880 3 has children (is => 'rw', type => ArrayRef);
881 factory add_outline (Object $file, Object $outline, Map %args) {
882 101 ▶ my ($x, $y) = $file->page->parse_position($args{position} || []);
Subroutine __ANON__: called CC=10 SCAR=24.6
Subroutine add_outline: called CC=3 SCAR=11.1
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 3 ? : 101 0 101
ref $tmp eq 'HASH' ? : 0 1 1
Condition66%2/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::add_outline", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::add_outline", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::add_outline", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::add_outline", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
883 101 ▶ $y += $args{jump_lh};
Condition50%1/2
$args{'position'} || []
l!l
0101
MC/DC0%0/1
$args{'position'} || []
$args{'position'}
Truth table50%1/2
A
A= $args{'position'}
Aresult
11
00
884 101 my $new = $outline->outline()->open()
885 ->title($args{outline_title})
886 ->dest($file->page->current, '-xyz' => [$x, $y, 0]);
887 101 return $class->new(
888 x => $x,
889 y => $y,
890 children => [],
891 level => $args{level} || 0,
892 title => $args{outline_title},
893 file => $file,
894 page => $file->page,
895 outline => $new,
896 font => $class->FACTORY->font(
897 $file,
898 %{$args{font}}
899 101 ▶ ),
Condition40%2/5
$args{'pad'} || '.'
l!l
0101
$args{'next_page'} || do { 'MooX::Press'->wrap_coderef({'definition_context', {'file', __FILE__, 'line', __LINE__, 'package', __PACKAGE__, 'via', 'Zydeco'}, 'attributes', [], 'caller', __PACKAGE__, 'code', sub { my $self = $_[0]; my $class = ref $self || $self; do { my $self = shift(); $file->add_page('open', 1); return $file->page }; } , 'optimize', 0}) }
l!l&&r!l&&!r
01010
MC/DC0%0/1
$args{'pad'} || '.'
$args{'pad'}
MC/DC0%0/2
$args{'next_page'} || do { 'MooX::Press'->wrap_coderef({'definition_context', {'file', __FILE__, 'line', __LINE__, 'package', __PACKAGE__, 'via', 'Zydeco'}, 'attributes', [], 'caller', __PACKAGE__, 'code', sub { my $self = $_[0]; my $class = ref $self || $self; do { my $self = shift(); $file->add_page('open', 1); return $file->page }; } , 'optimize', 0}) }
$args{'next_page'} do { 'MooX::Press'->wrap_coderef({'definition_context', {'file', __FILE__, 'line', __LINE__, 'package', __PACKAGE__, 'via', 'Zydeco'}, 'attributes', [], 'caller', __PACKAGE__, 'code', sub { my $self = $_[0]; my $class = ref $self || $self; do { my $self = shift(); $file->add_page('open', 1); return $file->page }; } , 'optimize', 0}) }
Truth table50%1/2
A
A= $args{'pad'}
Aresult
11
00
Truth table33%1/3
A || B
A= $args{'next_page'}B= do { 'MooX::Press'->wrap_coderef({'definition_context', {'file', __FILE__, 'line', __LINE__, 'package', __PACKAGE__, 'via', 'Zydeco'}, 'attributes', [], 'caller', __PACKAGE__, 'code', sub { my $self = $_[0]; my $class = ref $self || $self; do { my $self = shift(); $file->add_page('open', 1); return $file->page }; } , 'optimize', 0}) }
ABresult
1X1
011
000
900 pad => $args{pad} || '.',
901 101 next_page => $args{next_page} || do { method {
902 2 ▶ my $self = shift;
Subroutine __ANON__: called CC=2 SCAR=7.1
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
200
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
903 2 $file->add_page(open => 1);
904 2 #$file->page->set_position($file->toc->parse_position([]));
905 return $file->page;
906 2 } },
907 101 ▶ padding => $args{padding} || 0,
Condition50%3/6
$args{'padding'} || 0
l!l
0101
$args{'align'} || 'left'
l!l
0101
$args{'position'} || []
l!l
0101
MC/DC0%0/1
$args{'padding'} || 0
$args{'padding'}
MC/DC0%0/1
$args{'align'} || 'left'
$args{'align'}
MC/DC0%0/1
$args{'position'} || []
$args{'position'}
Truth table50%1/2
A
A= $args{'padding'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'align'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'position'}
Aresult
11
00
908 align => $args{align} || 'left',
909 position => $args{position} || [],
910 (map {
911 $args{$_} ? ( $_ => $args{$_} ) : ()
912 101 ▶ } qw/margin_bottom margin_top indent align pad_end/)
Branch: 1 branch
BranchTrueFalseTotal
$args{$_} ? : 0 505 505
Condition100%2/2
$args{'level'} || 0
l!l
6932
MC/DC100%1/1
$args{'level'} || 0
$args{'level'}
Truth table100%2/2
A
A= $args{'level'}
Aresult
11
00
913 );
914 3 }
915 3 method render (Map %args) {
916 101 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=4 SCAR=14.1
Subroutine render: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 101 0 101
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
10100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC::Outline", "Mxpress::PDF::Plugin::TOC::Outline::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC::Outline", "Mxpress::PDF::Plugin::TOC::Outline::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC::Outline", "Mxpress::PDF::Plugin::TOC::Outline::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC::Outline", "Mxpress::PDF::Plugin::TOC::Outline::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
917 101 $self->pad_end($self->page->num + $args{page_offset});
918 101 $self->add($self->title);
919 101 my ($x, $y, $w) = ($self->file->page->x, $self->file->page->y, $self->file->page->w);
920 101 my $annotation = $self->file->page->current->annotation()->rect(
921 101 $x, $y + 3.5, $w, $y - 3.5
922 )->link($self->page->current, -xyz => [$self->x, $self->y, 0]);
923 for (@{$self->children}) {
924 101 $_->render(%args);
925 67 }
926 }
927 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
928 3 ▶ class Plugin::TOC {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.1
Subroutine __ANON__: called CC=1 SCAR=0.1
929 3 has count (is => 'rw', type => Num);
930 3 has toc_placeholder (is => 'rw', type => HashRef);
931 3 has outline (is => 'rw', type => Object);
932 3 has outlines (is => 'rw', type => ArrayRef);
933 3 has indent (is => 'rw', type => Num);
934 3 has levels (is => 'rw', type => ArrayRef);
935 3 has toc_line_offset (is => 'rw', type => Num);
936 3 has font (is => 'rw', type => HashRef);
937 factory toc (Object $file, Map %args) {
938 1 ▶ return $class->new(
Subroutine __ANON__: called CC=7 SCAR=21.5
Subroutine toc: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::toc", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
939 file => $file,
940 outline => $file->pdf->outlines()->outline,
941 outlines => [],
942 count => 0,
943 toc_line_offset => $args{toc_line_offset} || 0,
944 padding => $args{padding} || 0,
945 levels => $args{levels} || [qw/title subtitle subsubtitle/],
946 indent => $args{indent} || 5,
947 ($args{font} ? (font => $args{font}) : ())
948 1 ▶ );
Branch: 1 branch
BranchTrueFalseTotal
$args{'font'} ? : 1 0 1
Condition50%4/8
$args{'toc_line_offset'} || 0
l!l
01
$args{'padding'} || 0
l!l
01
$args{'levels'} || ['title', 'subtitle', 'subsubtitle']
l!l
01
$args{'indent'} || 5
l!l
01
MC/DC0%0/1
$args{'toc_line_offset'} || 0
$args{'toc_line_offset'}
MC/DC0%0/1
$args{'padding'} || 0
$args{'padding'}
MC/DC0%0/1
$args{'levels'} || ['title', 'subtitle', 'subsubtitle']
$args{'levels'}
MC/DC0%0/1
$args{'indent'} || 5
$args{'indent'}
Truth table50%1/2
A
A= $args{'toc_line_offset'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'padding'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'levels'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'indent'}
Aresult
11
00
949 3 }
950 3 method placeholder (Map %args) {
951 1 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=4 SCAR=14.4
Subroutine placeholder: called CC=3 SCAR=11.7
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::placeholder", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::placeholder", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::placeholder", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::placeholder", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
952 1 #$self->file->subtitle->add($args{title} ? @{$args{title}} : 'Table of contents');
953 $self->toc_placeholder({
954 page => $self->file->page,
955 position => [$self->file->page->parse_position($args{position} || [])]
956 1 ▶ });
Condition50%1/2
$args{'position'} || []
l!l
01
MC/DC0%0/1
$args{'position'} || []
$args{'position'}
Truth table50%1/2
A
A= $args{'position'}
Aresult
11
00
957 $self->file->onsave('toc', 'render', %args);
958 1 $self->file->add_page(force_new_page => 1);
959 1 return $self->file;
960 3 }
961 3 method add (Map %args) {
962 101 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=11 SCAR=24.5
Subroutine add: called CC=3 SCAR=11.4
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 101 0 101
ref $tmp eq 'HASH' ? : 0 1 1
Condition50%3/6
ref $self || $self
l!l&&r!l&&!r
10100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
10010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table66%2/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
963 101 $self->count($self->count + 1);
964 101 $args{level} = 0;
965 101 my ($text, %targs, $level);
966 101 for (@{$self->levels}) {
967 101 if (defined $args{$_}) {
968 195 ▶ ($text, %targs) = ref $args{$_} ? @{$args{$_}} : $args{$_};
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args{$_}) 101 94 195
969 0 ▶ $level = $_;
Branch: 1 branch
BranchTrueFalseTotal
ref $args{$_} ? : 0 101 101
970 101 $args{outline_title} ||= $text;
971 101 ▶ $args{jump_lh} = $self->file->$level->font->line_height;
Condition33%1/3
$args{"outline_title"} ||= $text
l!l&&r!l&&!r
01010
MC/DC0%0/2
$args{"outline_title"} ||= $text
$args{"outline_title"} $text
Truth table33%1/3
A ||= B
A= $args{"outline_title"}B= $text
ABresult
1X1
011
000
972 101 last;
973 101 }
974 $args{level}++;
975 94 }
976 $args{font} ||= $self->font;
977 101 ▶ my $outline;
Condition33%1/3
$args{"font"} ||= $self->font
l!l&&r!l&&!r
01010
MC/DC0%0/2
$args{"font"} ||= $self->font
$args{"font"} $self->font
Truth table33%1/3
A ||= B
A= $args{"font"}B= $self->font
ABresult
1X1
011
000
978 101 $outline = $self->_recurse_find('level', 'children', $args{level} - 1, reverse @{$self->outlines}) if $args{level};
979 101 ▶ my $add = $self->FACTORY->add_outline($self->file, ($outline ? $outline->outline : $self->outline), %args);
Branch: 1 branch
BranchTrueFalseTotal
if $args{"level"} 69 32 101
980 101 ▶ if ($outline) {
Branch: 1 branch
BranchTrueFalseTotal
$outline ? : 67 34 101
981 101 ▶ $add->indent($self->indent * $add->level);
Branch: 1 branch
BranchTrueFalseTotal
if ($outline) { } 67 34 101
982 67 push @{ $outline->children }, $add;
983 67 } else {
984 push @{ $self->outlines }, $add;
985 34 }
986 $self->file->$level->add($text, %targs);
987 101 return $self->file;
988 3 }
989 3 method render (Map %args) {
990 1 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=6 SCAR=18.9
Subroutine render: called CC=3 SCAR=11.7
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::TOC", "Mxpress::PDF::Plugin::TOC::render", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
991 1 my $placeholder = $self->toc_placeholder;
992 1 my ($x, $y, $w, $h) = $self->set_position(@{$placeholder->{position}});
993 1 $args{page_offset} = 0;
994 1 my $one_toc_link = $self->outlines->[0]->font->size + $self->toc_line_offset/mm;
995 1 $self->file->page($placeholder->{page});
996 1 my $total_height = ($self->count * $one_toc_link) - ($h + ($self->file->page->columns > 1
997 1 ▶ ? ($self->file->page->h * ($self->file->page->columns - $self->file->page->column))
Branch: 1 branch
BranchTrueFalseTotal
$self->file->page->columns > 1 ? : 1 0 1
998 : 0
999 ));
1000 while ($total_height > 0) {
1001 1 ▶ $args{page_offset}++;
Branch: 1 branch
BranchTrueFalseTotal
if ($total_height > 0) 0 1 1
1002 0 $self->file->add_page(num => $placeholder->{page}->num + $args{page_offset});
1003 0 $total_height -= $self->file->page->h;
1004 0 }
1005 $self->file->page($placeholder->{page});
1006 1 $self->file->page->h($self->file->page->h - $self->file->page->hf_offset);
1007 1 for my $outline (@{$self->outlines}) {
1008 1 $outline->render(%args);
1009 34 }
1010 }
1011 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1012 3 ▶ class Plugin::Image {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.3
Subroutine __ANON__: called CC=1 SCAR=0.3
1013 3 has width (is => 'rw', type => Num);
1014 3 has height (is => 'rw', type => Num);
1015 3 has align (is => 'rw', type => Str);
1016 3 has valid_mime (is => 'rw', type => HashRef, builder => 1);
1017 method _build_valid_mime {
1018 1 ▶ return {
Subroutine __ANON__: called CC=2 SCAR=7.2
Subroutine _build_valid_mime: called CC=1 SCAR=0.2
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1019 jpeg => 'image_jpeg',
1020 1 tiff => 'image_tiff',
1021 pnm => 'image_pnm',
1022 png => 'image_png',
1023 gif => 'image_gif'
1024 };
1025 3 }
1026 3 factory image (Object $file, Map %args) {
1027 1 ▶ return $class->new(
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine image: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::image", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1028 1 file => $file,
1029 padding => 0,
1030 align => 'center',
1031 %args
1032 );
1033 3 }
1034 3 multi method add (FileHandle $image, Str $type, Map %args) {
1035 0 ▶ $self->set_attrs(%args);
Subroutine __ANON__: not called CC=3 SCAR=23.2
Branch: 1 branch
BranchTrueFalseTotal
@_ == 3 ? : 0 0 0
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1036 0 $type = $self->valid_mime->{$type};
1037 0 return $self->_add($self->file->pdf->$type($image));
1038 0 }
1039 3 multi method add (Str $image, Map %args) {
1040 1 ▶ $self->set_attrs(%args);
Subroutine __ANON__: called CC=3 SCAR=11.3
Branch: 1 branch
BranchTrueFalseTotal
@_ == 2 ? : 1 0 1
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
100
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1041 1 my $type = $self->_identify_type($image);
1042 1 return $self->_add($self->file->pdf->$type($image));
1043 3 }
1044 3 method _add (Object $image) {
1045 1 ▶ my ($x, $y, $w, $h) = $self->_image_position($image);
Subroutine __ANON__: called CC=2 SCAR=7.1
Subroutine _add: called CC=3 SCAR=11.7
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1046 1 my $photo = $self->file->page->current->gfx;
1047 1 $photo->image(
1048 1 $image,
1049 $x, $y, $w, $h
1050 );
1051 $self->set_y($y);
1052 1 return $self->file;
1053 3 }
1054 3 method _identify_type (Str $image) {
1055 1 ▶ my $reg = sprintf '\.(%s)$', join ("|", keys %{$self->valid_mime});
Subroutine __ANON__: called CC=3 SCAR=11.4
Subroutine _identify_type: called CC=3 SCAR=11.7
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_identify_type", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_identify_type", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_identify_type", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_identify_type", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1056 1 $image =~ m/$reg/;
1057 1 return $self->valid_mime->{$1} || 'image_png';
1058 3 ▶ }
Condition50%1/2
$self->valid_mime->{$1} || 'image_png'
l!l
10
MC/DC0%0/1
$self->valid_mime->{$1} || 'image_png'
$self->valid_mime->{$1}
Truth table50%1/2
A
A= $self->valid_mime->{$1}
Aresult
11
00
1059 3 method _image_position (Object $image) {
1060 1 ▶ my ($x, $y, $w, $h) = $self->parse_position($self->position || []);
Subroutine __ANON__: called CC=11 SCAR=31.4
Subroutine _image_position: called CC=3 SCAR=11.7
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 1 1
Condition33%2/6
ref $self || $self
l!l&&r!l&&!r
100
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_image_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_image_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_image_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Image", "Mxpress::PDF::Plugin::Image::_image_position", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1061 1 ▶ my $height = $self->height || $image->height;
Condition50%1/2
$self->position || []
l!l
01
MC/DC0%0/1
$self->position || []
$self->position
Truth table50%1/2
A
A= $self->position
Aresult
11
00
1062 1 ▶ my $width = $self->width || $image->width;
Condition33%1/3
$self->height || $image->height
l!l&&r!l&&!r
010
MC/DC0%0/2
$self->height || $image->height
$self->height $image->height
Truth table33%1/3
A || B
A= $self->heightB= $image->height
ABresult
1X1
011
000
1063 1 ▶ $width = $w if $width > $w;
Condition33%1/3
$self->width || $image->width
l!l&&r!l&&!r
010
MC/DC0%0/2
$self->width || $image->width
$self->width $image->width
Truth table33%1/3
A || B
A= $self->widthB= $image->width
ABresult
1X1
011
000
1064 1 ▶ if ($self->align eq 'fill') {
Branch: 1 branch
BranchTrueFalseTotal
if $width > $w 0 1 1
1065 1 ▶ $height = $h;
Branch: 3 branches
BranchTrueFalseTotal
if ($self->align eq 'fill') { } 0 1 1
elsif ($self->align eq 'right') { } 0 1 1
elsif ($self->align eq 'center') { } 1 0 1
1066 0 $width = $w;
1067 0 } elsif ($self->align eq 'right') {
1068 $x += ($w - $width);
1069 0 } elsif ($self->align eq 'center') {
1070 $x = ($w - $width) / 2;
1071 1 }
1072 # todo scale
1073 if ($height <= $h) {
1074 1 ▶ $y -= $height;
Branch: 1 branch
BranchTrueFalseTotal
if ($height <= $h) { } 1 0 1
1075 1 } else {
1076 $self->file->add_page;
1077 0 ($x, $y, $w, $h) = $self->parse_position([]);
1078 0 if ($height > $h) {
1079 0 ▶ $height = $h;
Branch: 1 branch
BranchTrueFalseTotal
if ($height > $h) 0 0 0
1080 0 }
1081 $y -= $height;
1082 0 }
1083 return ($x, $y, $width, $height);
1084 1 }
1085 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1086 3 ▶ class Plugin::Annotation {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.2
Subroutine __ANON__: called CC=1 SCAR=3.2
1087 3 has type (is => 'rw', type => Str);
1088 3 has w (is => 'rw', type => Num);
1089 3 has h (is => 'rw', type => Num);
1090 3 has open (is => 'rw', type => Bool);
1091 3 has rect (is => 'rw', type => ArrayRef);
1092 3 has border (is => 'rw', type => ArrayRef);
1093 factory annotation (Object $file, Map %args) {
1094 0 ▶ return $class->new(
Subroutine __ANON__: not called CC=2 SCAR=17.9
Subroutine annotation: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1095 0 file => $file,
1096 padding => 0,
1097 is => 'rw', type => 'text',
1098 open => 0,
1099 w => 0,
1100 h => 0,
1101 %args
1102 );
1103 3 }
1104 3 method add (Str $text, %args) {
1105 0 ▶ my $annotation = $self->file->page->current->annotation;
Subroutine __ANON__: not called CC=3 SCAR=23.9
Subroutine add: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1106 0 return $self->_add_annotation($self->type, $text, %args);
1107 0 }
1108 3 method _add_annotation (Str $type, Str $cont, Map %args) {
1109 0 ▶ $self->set_attrs(%args);
Subroutine __ANON__: not called CC=6 SCAR=37.4
Subroutine _add_annotation: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
@_ == 3 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::_add_annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::_add_annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::_add_annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Annotation", "Mxpress::PDF::Plugin::Annotation::_add_annotation", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1110 0 my $annotation = $self->file->page->current->annotation;
1111 0 my @xy = $self->parse_position(($self->position || []), 1);
1112 0 ▶ $annotation->$type($cont,
Condition0%0/2
$self->position || []
l!l
00
MC/DC0%0/1
$self->position || []
$self->position
Truth table0%0/2
A
A= $self->position
Aresult
11
00
1113 0 ▶ -rect => $self->rect || [@xy, $self->w, $self->h],
Condition0%0/4
$self->rect || [@xy, $self->w, $self->h]
l!l
00
$self->border || [@xy, $self->w]
l!l
00
MC/DC0%0/1
$self->rect || [@xy, $self->w, $self->h]
$self->rect
MC/DC0%0/1
$self->border || [@xy, $self->w]
$self->border
Truth table0%0/2
A
A= $self->rect
Aresult
11
00
Truth table0%0/2
A
A= $self->border
Aresult
11
00
1114 -open => $self->open,
1115 -border => $self->border || [@xy, $self->w]
1116 ); # :/
1117 return $self->file;
1118 0 }
1119 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1120 3 ▶ class Plugin::List extends Plugin::Text {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.3
Subroutine __ANON__: called CC=1 SCAR=3.3
1121 3 has type ( is => 'rw', type => Str );
1122 factory list (Object $file, Map %args) {
1123 0 ▶ my $self = $class->generic_new($file, %args);
Subroutine __ANON__: not called CC=3 SCAR=23.9
Subroutine list: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::list", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1124 0 $self->type($args{type} || 'bullet');
1125 0 ▶ return $self;
Condition0%0/2
$args{'type'} || 'bullet'
l!l
00
MC/DC0%0/1
$args{'type'} || 'bullet'
$args{'type'}
Truth table0%0/2
A
A= $args{'type'}
Aresult
11
00
1126 0 }
1127 3 around add (ArrayRef $list, Map %args) {
1128 0 ▶ $self->set_attrs(%args);
Subroutine __ANON__: not called CC=5 SCAR=34.0
Branch: 1 branch
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1129 0 my $i = 0;
1130 0 for my $item (@{$list}) {
1131 0 $i++;
1132 0 my ($x, $y) = $self->parse_position([]);
1133 0 my $offset;
1134 0 if ($self->type eq 'number') {
1135 0 ▶ $offset = 5;
Branch: 1 branch
BranchTrueFalseTotal
if ($self->type eq 'number') { } 0 0 0
1136 0 $self->$next("$i\.", position => [$x*mm, $y*mm]);
1137 0 } else {
1138 $offset = (($self->font->line_height*mm)/2) + 0.6;
1139 0 $self->file->circle->add(
1140 0 fill_colour => '#000',
1141 radius => 0.5,
1142 position => [($x*mm), ($y*mm) - $offset]
1143 );
1144 }
1145 $self->$next($item, position => [($x*mm) + $offset, $y*mm]);
1146 0 }
1147 }
1148 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1149 3 ▶ class Plugin::Form {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.9
Subroutine __ANON__: called CC=1 SCAR=4.2
1150 3 ▶ use PDF::API2::Basic::PDF::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
1151 3 has acro (is => 'rw', type => Object);
1152 3 has fields (is => 'rw', type => ArrayRef);
1153 factory form (Object $file, Map %args) {
1154 0 ▶ return $class->new(
Subroutine __ANON__: not called CC=2 SCAR=17.9
Subroutine form: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::form", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1155 0 file => $file,
1156 %args
1157 );
1158 3 }
1159 3 method add (Map %args) {
1160 0 ▶ return $self if $self->acro;
Subroutine __ANON__: not called CC=4 SCAR=29.1
Subroutine add: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::add", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1161 0 ▶ my $form = PDFDict();
Branch: 1 branch
BranchTrueFalseTotal
if $self->acro 0 0 0
1162 0 $form->{NeedAppearances} = PDFBool( 'true' );
1163 0 $self->acro($form);
1164 0 $self->file->onsave('form', 'end', why => 1);
1165 0 }
1166 3 method end (Map %args) {
1167 0 ▶ $self->acro->{Fields} = PDFArray(@{$self->fields});
Subroutine __ANON__: not called CC=3 SCAR=23.9
Subroutine end: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::end", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1168 0 $self->file->pdf->{catalog}->{'AcroForm'} = $self->acro;
1169 0 }
1170 3 method _add_to_fields (Object $field) {
1171 0 ▶ $self->add();
Subroutine __ANON__: not called CC=2 SCAR=17.9
Subroutine _add_to_fields: not called CC=3 SCAR=24.8
Branch: 1 branch
BranchTrueFalseTotal
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::_add_to_fields", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::_add_to_fields", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::_add_to_fields", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form", "Mxpress::PDF::Plugin::Form::_add_to_fields", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1172 0 my $fields = $self->fields;
1173 0 push @{$fields}, $field;
1174 0 return $self->fields($fields);
1175 0 }
1176 3 ▶ class Plugin::Form::Field extends Plugin::Text {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.8
Subroutine __ANON__: called CC=1 SCAR=3.8
1177 3 ▶ use PDF::API2::Basic::PDF::Literal;
Subroutine BEGIN: called CC=1 SCAR=0.0
1178 3 ▶ use PDF::API2::Basic::PDF::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
1179 3 has xo (is => 'rw', type => Object);
1180 3 has annotate (is => 'rw', type => Object);
1181 3 has name (is => 'rw', type => Str);
1182 around add (Str $text, Map %args) {
1183 0 ▶ return $self->$next($text, %args) if $args{noconfigure};
Subroutine __ANON__: not called CC=8 SCAR=42.1
Branch: 1 branch
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1184 0 ▶ my @pos = ($self->parse_position([]));
Branch: 1 branch
BranchTrueFalseTotal
if $args{"noconfigure"} 0 0 0
1185 0 $self->file->form->add; #REMOVE
1186 0 my $form = $self->xo(
1187 0 $self->file->pdf->xo_form()
1188 );
1189 my $file = $self->$next($text, %args);
1190 0 my $annotate = $self->annotate(
1191 0 $self->file->page->current->annotation
1192 );
1193 $form->{OpenAction} = PDFArray($self->annotate, PDFName('XYZ'), PDFNull, PDFNull, PDFNum(0));
1194 0 $form->bbox(0, 0, 149.8, 14.4);
1195 0 $annotate->{DR} = $self->font->load();
1196 0 $annotate->{T} = PDFStr($self->name || $text);
1197 0 ▶ $annotate->{Subtype} = PDFName('Widget');
Condition0%0/3
$self->name || $text
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->name || $text
$self->name $text
Truth table0%0/3
A || B
A= $self->nameB= $text
ABresult
1X1
011
000
1198 0 $annotate->{P} = $self->file->page->current;
1199 0 $args{position} ||= \@pos;
1200 0 ▶ $self->configure(%args) if $self->can('configure');
Condition0%0/2
$args{"position"} ||= \@pos
l!l
00
MC/DC0%0/1
$args{"position"} ||= \@pos
$args{"position"}
Truth table0%0/2
A
A= $args{"position"}
Aresult
11
00
1201 0 ▶ $self->_set_rect(%args) if $self->can('_set_rect');
Branch: 1 branch
BranchTrueFalseTotal
if $self->can("configure") 0 0 0
1202 0 ▶ $self->file->form->_add_to_fields($self->annotate);
Branch: 1 branch
BranchTrueFalseTotal
if $self->can("_set_rect") 0 0 0
1203 0 return $file;
1204 0 }
1205 3 method _set_rect (Map %args) {
1206 0 ▶ my @pos = @{$args{position}};
Subroutine __ANON__: not called CC=3 SCAR=24.0
Subroutine _set_rect: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field", "Mxpress::PDF::Plugin::Form::Field::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field", "Mxpress::PDF::Plugin::Form::Field::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field", "Mxpress::PDF::Plugin::Form::Field::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field", "Mxpress::PDF::Plugin::Form::Field::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1207 0 @pos = (
1208 0 $self->end_w + $self->text->advancewidth(' '),
1209 $pos[1] + ($self->font->line_height/3),
1210 $pos[2] + ($self->file->page->padding/mm),
1211 $pos[1] - ($self->font->line_height*2)
1212 );
1213 $self->annotate->rect(@pos);
1214 0 }
1215 3 ▶ class Plugin::Form::Field::Input {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=3.9
Subroutine __ANON__: called CC=1 SCAR=4.0
1216 factory input (Object $file, Map %args) {
1217 0 ▶ $args{pad} ||= '_';
Subroutine __ANON__: not called CC=4 SCAR=29.0
Subroutine input: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::input", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1218 0 ▶ $args{margin_bottom} ||= 1.7;
Condition0%0/2
$args{"pad"} ||= "_"
l!l
00
MC/DC0%0/1
$args{"pad"} ||= "_"
$args{"pad"}
Truth table0%0/2
A
A= $args{"pad"}
Aresult
11
00
1219 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"margin_bottom"} ||= "1.7"
l!l
00
MC/DC0%0/1
$args{"margin_bottom"} ||= "1.7"
$args{"margin_bottom"}
Truth table0%0/2
A
A= $args{"margin_bottom"}
Aresult
11
00
1220 0 }
1221 3 method configure (Map %args) {
1222 0 ▶ $self->annotate->{FT} = PDFName('Tx');
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine configure: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Input", "Mxpress::PDF::Plugin::Form::Field::Input::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Input", "Mxpress::PDF::Plugin::Form::Field::Input::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Input", "Mxpress::PDF::Plugin::Form::Field::Input::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Input", "Mxpress::PDF::Plugin::Form::Field::Input::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1223 0 }
1224 3 ▶ class Plugin::Form::Field::Textarea {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=4.1
Subroutine __ANON__: called CC=1 SCAR=4.1
1225 3 has lines (is => 'rw', type => Num);
1226 factory textarea (Object $file, Map %args) {
1227 0 ▶ $args{pad} ||= '_';
Subroutine __ANON__: not called CC=5 SCAR=33.1
Subroutine textarea: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::textarea", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1228 0 ▶ $args{margin_bottom} ||= 1.7;
Condition0%0/2
$args{"pad"} ||= "_"
l!l
00
MC/DC0%0/1
$args{"pad"} ||= "_"
$args{"pad"}
Truth table0%0/2
A
A= $args{"pad"}
Aresult
11
00
1229 0 ▶ my $self = $class->generic_new($file, %args);
Condition0%0/2
$args{"margin_bottom"} ||= "1.7"
l!l
00
MC/DC0%0/1
$args{"margin_bottom"} ||= "1.7"
$args{"margin_bottom"}
Truth table0%0/2
A
A= $args{"margin_bottom"}
Aresult
11
00
1230 0 $self->lines($args{lines} ||= 4);
1231 0 ▶ return $self;
Condition0%0/2
$args{"lines"} ||= 4
l!l
00
MC/DC0%0/1
$args{"lines"} ||= 4
$args{"lines"}
Truth table0%0/2
A
A= $args{"lines"}
Aresult
11
00
1232 0 }
1233 3 around configure (Map %args) {
1234 0 ▶ $self->$next(%args);
Subroutine __ANON__: not called CC=4 SCAR=28.7
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1235 0 my $ew = $self->end_w;
1236 0 my $ns = $self->no_space;
1237 0 my $tp = $self->text->advancewidth($self->pad);
1238 0 my $x = ($ew + $tp)*mm;
1239 0 for (1 .. $self->lines) {
1240 0 $self->add(
1241 0 ' ' . $self->pad,
1242 position => [
1243 $x,
1244 ($self->file->page->y*mm) - $self->padding,
1245 (($self->file->page->w+$tp)*mm) + $self->file->page->padding + - $x
1246 ],
1247 noconfigure => 1,
1248 no_space => 1
1249 );
1250 }
1251 $self->no_space($ns);
1252 0 }
1253 3 method _set_rect (Map %args) {
1254 0 ▶ my @pos = @{$args{position}};
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine _set_rect: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Textarea", "Mxpress::PDF::Plugin::Form::Field::Textarea::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Textarea", "Mxpress::PDF::Plugin::Form::Field::Textarea::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Textarea", "Mxpress::PDF::Plugin::Form::Field::Textarea::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Textarea", "Mxpress::PDF::Plugin::Form::Field::Textarea::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1255 0 @pos = (
1256 0 $self->end_w - $self->text->advancewidth(' ' . $self->pad),
1257 $pos[1] + ($self->font->line_height/3),
1258 $pos[2] + ($self->file->page->padding/mm),
1259 $pos[1] - ($self->font->line_height* 2 * $self->lines)
1260 );
1261 $self->annotate->rect(@pos);
1262 0 }
1263 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1264 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1265 3 ▶ class Plugin::Form::Field::Select {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=4.7
Subroutine __ANON__: called CC=1 SCAR=4.7
1266 factory select (Object $file, Map %args) {
1267 0 ▶ $args{pad} ||= '_';
Subroutine __ANON__: not called CC=4 SCAR=29.0
Subroutine select: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::select", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1268 0 ▶ $args{margin_bottom} ||= 1.7;
Condition0%0/2
$args{"pad"} ||= "_"
l!l
00
MC/DC0%0/1
$args{"pad"} ||= "_"
$args{"pad"}
Truth table0%0/2
A
A= $args{"pad"}
Aresult
11
00
1269 0 ▶ $class->generic_new($file, %args);
Condition0%0/2
$args{"margin_bottom"} ||= "1.7"
l!l
00
MC/DC0%0/1
$args{"margin_bottom"} ||= "1.7"
$args{"margin_bottom"}
Truth table0%0/2
A
A= $args{"margin_bottom"}
Aresult
11
00
1270 0 }
1271 3 method configure (Map %args) {
1272 0 ▶ $self->annotate->{V} = do {
Subroutine __ANON__: not called CC=3 SCAR=24.2
Subroutine configure: not called CC=3 SCAR=24.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::configure", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1273 0 my $s = PDFStr('');
1274 0 $s->{' isutf'} = PDFBool(1);
1275 0 $s;
1276 0 };
1277 $self->annotate->{DA} = PDFStr('0 0 0 rg /F3 11 Tf');
1278 0 $self->annotate->{DV} = $self->annotate->{V};
1279 0 $self->annotate->{FT} = PDFName('Ch');
1280 0 $self->annotate->{Ff} = PDFNum(393216);
1281 0 $self->annotate->{Opt} = PDFArray(map { PDFStr($_); } @{$args{options}});
1282 0 }
1283 3 method _set_rect (Map %args) {
1284 0 ▶ my @pos = @{$args{position}};
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine _set_rect: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/6
ref $self || $self
l!l&&r!l&&!r
000
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF::Plugin::Form::Field::Select", "Mxpress::PDF::Plugin::Form::Field::Select::_set_rect", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1285 0 @pos = (
1286 0 $self->end_w + $self->text->advancewidth($self->pad),
1287 $pos[1] + ($self->font->line_height/2),
1288 $pos[2] + ($self->file->page->padding/mm),
1289 $pos[1] - ($self->font->line_height)
1290 );
1291 $self->annotate->rect(@pos);
1292 0 }
1293 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1294 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1295 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1296 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1297 3 ▶ class Factory {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=1.1
Subroutine __ANON__: called CC=1 SCAR=1.1
1298 3 ▶ use PDF::API2;
Subroutine BEGIN: called CC=1 SCAR=0.0
1299 factory new_pdf (Str $name, Map %args) {
1300 2 ▶ return $factory->generate_file(\%args)->new(
Subroutine __ANON__: called CC=3 SCAR=11.4
Subroutine new_pdf: called CC=3 SCAR=11.4
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 2 0 2
ref $tmp eq 'HASH' ? : 0 2 2
Condition33%1/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::new_pdf", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
020
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::new_pdf", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::new_pdf", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table33%1/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::new_pdf", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1301 file_name => $name,
1302 pages => [],
1303 num => 0,
1304 page_size => 'A4',
1305 page_args => $args{page} || {},
1306 pdf => PDF::API2->new( -file => sprintf("%s.pdf", $name)),
1307 2 ▶ )->add_page;
Condition50%1/2
$args{'page'} || {}
l!l
20
MC/DC0%0/1
$args{'page'} || {}
$args{'page'}
Truth table50%1/2
A
A= $args{'page'}
Aresult
11
00
1308 3 }
1309 3 factory open (Str $name, Map %args) {
1310 0 ▶ my $pdf = PDF::API2->open($name);
Subroutine __ANON__: not called CC=3 SCAR=24.8
Subroutine open: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ == 2 ? : 0 0 0
ref $tmp eq 'HASH' ? : 0 0 0
Condition0%0/3
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::open", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
l!l&&r!l&&!r
000
MC/DC0%0/2
$check ||= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::open", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
$check do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::open", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
Truth table0%0/3
A ||= B
A= $checkB= do { my $tmp = "MooX::Press"->_build_method_signature_check("Mxpress::PDF", "Mxpress::PDF::open", "positional", $signature, \@invocants); ref $tmp eq "HASH" ? $tmp->{"closure"} : $tmp }
ABresult
1X1
011
000
1311 0 my $file = $factory->generate_file(\%args)->new(
1312 pdf => $pdf,
1313 file_name => $name,
1314 pages => [],
1315 page_size => 'A4',
1316 page_args => $args{page} || {},
1317 );
1318 0 ▶ $file->page($factory->page($pdf,
Condition0%0/2
$args{'page'} || {}
l!l
00
MC/DC0%0/1
$args{'page'} || {}
$args{'page'}
Truth table0%0/2
A
A= $args{'page'}
Aresult
11
00
1319 open => 1,
1320 num => 1,
1321 page_size => 'A4',
1322 %{$args{page}}
1323 0 ));
1324 return $file;
1325 0 }
1326 3 ▶ }
Subroutine BEGIN: called CC=1 SCAR=0.0
1327 }
1328  
1329 # probably should dry-run to calculate positions
1330  
1331 3 1;
1332  
1333 __END__
↑ Summary