Condition Coverage

blib/lib/PDF/Make/Builder.pm
Criterion Covered Total %
condition 184 321 57.3


and 3 conditions

line !l l&&!r l&&r condition
142 0 144 2 $bg and $bg ne "#fff"
144 0 2 $bg and $bg ne "#fff" and $bg ne "#ffffff"
157 0 1 3 $num >= 1 and $num <= scalar @$pages
510 5 2 3 $parent_key and $outlines->{$parent_key}
535 0 0 10 $all and $idx >= 0
0 1 9 $all and $idx >= 0 and $idx < @$all
547 0 0 3 defined $args{'x'} and defined $args{'y'}
0 1 2 defined $args{'x'} and defined $args{'y'} and defined $args{'w'}
1 0 2 defined $args{'x'} and defined $args{'y'} and defined $args{'w'} and defined $args{'h'}
597 2 4 1 exists $args{'text'} and ref $args{'text'} eq "ARRAY"
653 0 1 1 $target >= 0 and $target < scalar @$ps
766 1 0 0 $rewrite && @{$bp->redactions;}
859 0 0 6 $page_index >= 0 and $page_index < scalar @$ps
896 2 0 4 defined $text and length $text
934 0 0 1 $reds and @$reds
957 0 0 2 defined $text and length $text
1039 15 0 0 exists $args{'default'} and not exists $args{'default_value'}
1070 0 0 9 defined $x and defined $y
0 0 9 defined $x and defined $y and defined $w
0 0 9 defined $x and defined $y and defined $w and defined $h
1136 109 0 5 $t and @{$t->entries;}
1152 0 34 0 defined $overlay and length $overlay
1170 121 2 1 $rewrite && @{$bp->redactions;}
1183 0 113 1 $wms and @$wms
1225 113 0 1 $sig and $sig->{'pkcs12'}
0 1 0 $sig and $sig->{'pkcs12'} and -f $sig->{'pkcs12'}
1230 0 0 0 $identity and $identity->can_sign
1255 0 0 114 defined $dir and length $dir
0 0 114 defined $dir and length $dir and $dir ne "."
1297 41 10 3 $reader->is_encrypted and not $reader->is_authenticated
1313 2 0 0 $reader->is_encrypted and not $reader->is_authenticated
1329 2 0 0 $reader->is_encrypted and not $reader->is_authenticated
1368 14 6 5 $reader->is_encrypted and not $reader->is_authenticated
1382 0 1 44 $idx >= 0 and $idx < $count
1435 0 0 3 $index >= 0 and $index < scalar @$ps
1454 0 0 1 $from >= 0 and $from < scalar @$ps
1455 0 0 1 $to >= 0 and $to < scalar @$ps
1468 0 0 1 $index >= 0 and $index < scalar @$ps
1504 0 0 4 $index >= 0 and $index < scalar @$ps

or 2 conditions

line l !l condition
87 3 164 $cfg->{'text'}{'font'} // {}
91 2 165 $font_args->{'colour'} // "#000"
3 164 $font_args->{'size'} // 9
3 164 $font_args->{'family'} // "Helvetica"
110 115 31 $args{'page_size'} // "A4"
112 7 139 $args{'padding'} // 20
129 6 140 $args{'background'} // "#fff"
8 138 $args{'columns'} // 1
231 1 1 $dy //= 0
301 308 44 $cfg->{$type} // {}
303 0 3 $args->{'font'} // {}
500 10 0 $args{'page'} // 0
501 2 8 $args{'dest'} // "Fit"
503 1 9 $args{'left'} // 0
504 2 8 $args{'top'} // 0
505 1 9 $args{'zoom'} // 0
559 0 18 $args{'highlight'} // "Invert"
571 1 0 $args{'file_page'} // 0
1 0 $args{'new_window'} // 0
599 1 3 $args{'x'} // 72
600 1 3 $args{'w'} // 300
601 1 3 $args{'h'} // 70
602 0 4 ($args{'bg_colour'} // $args{'fill_colour'}) // "#fffbeb"
603 1 3 $args{'padding'} // 12
604 0 4 $args{'line_gap'} // 14
605 0 4 $args{'colour'} // "#92400e"
606 0 4 $args{'size'} // 10
643 5 1 $args{'rect'} // die("PDF::Make::Builder: add_note requires rect or lines")
644 4 1 $args{'text'} // ""
645 2 3 $args{'icon'} // "Note"
646 1 4 $args{'open'} // 0
672 0 3 $args{'x'} // 72
673 0 3 $args{'w'} // 200
674 0 3 $args{'h'} // 50
675 0 3 ($args{'bg_colour'} // $args{'fill_colour'}) // "#e5e7eb"
676 0 3 $args{'colour'} // "#111827"
677 0 3 $args{'size'} // 20
678 0 3 $args{'border'} // 0
713 3 1 $args{'rect'} // die("PDF::Make::Builder: add_stamp requires rect or text")
714 3 0 $args{'type'} // "Draft"
801 1 0 delete $args{'text'} // die("PDF::Make::Builder: add_watermark requires text")
838 1 0 $layers->{$name} // die("PDF::Make::Builder: unknown layer '${name}'")
857 6 0 delete $args{'page'} // 0
872 0 6 ($args{'overlay_colour'} // $args{'overlay_color'}) // "#000"
874 0 6 $args{'overlay_font_size'} // 10
899 4 0 $font->size || 9
953 2 0 $r->{'overlay_fill'} // "#000"
959 2 0 $r->{'overlay_size'} || 10
962 2 0 $font->size || 9
988 1 0 $args{'c'} // 0
0 1 $args{'m'} // 0
0 1 $args{'y'} // 0
0 1 $args{'k'} // 0
1025 27 1 delete $args{'type'} // die("PDF::Make::Builder: add_field requires type")
1026 26 1 delete $args{'name'} // die("PDF::Make::Builder: add_field requires name")
1028 24 2 $_field_class{$type} // die("PDF::Make::Builder: unknown field type '${type}'")
1061 0 1 delete $args{'h'} // 22
1118 0 5 $cfg->{'toc'} // {}
1211 5 0 $enc->{'algorithm'} // "AES-256"
1212 1 0 ($enc->{'user_password'} // $enc->{'password'}) // ""
1214 0 5 $enc->{'permissions'} // 4294967292
1228 0 0 $sig->{'password'} // ""
1283 1 0 $page_index //= 0
1290 47 7 $args{'page'} // 0
1298 3 0 $args{'password'} // ""
1314 0 0 $args{'password'} // ""
1325 0 2 $args{'page'} // 0
1330 0 0 $args{'password'} // ""
1369 5 0 $args{'password'} // ""

or 3 conditions

line l !l&&r !l&&!r condition
185 0 1 0 $p->x || $p->content_x
543 3 0 0 defined $args{'x'} or defined $args{'y'}
3 0 0 defined $args{'x'} or defined $args{'y'} or defined $args{'w'}
0 0 0 defined $args{'x'} or defined $args{'y'} or defined $args{'w'} or defined $args{'h'}
597 3 1 6 exists $args{'lines'} or exists $args{'text'} and ref $args{'text'} eq "ARRAY"
598 3 1 0 $args{'lines'} // $args{'text'}
602 0 0 4 $args{'bg_colour'} // $args{'fill_colour'}
627 1 6 0 $fsize //= $size
628 1 6 0 $fcol //= $colour
675 0 0 3 $args{'bg_colour'} // $args{'fill_colour'}
679 0 3 0 $args{'border_colour'} // $colour
870 0 0 6 $w <= 0 or $h <= 0
872 0 0 6 $args{'overlay_colour'} // $args{'overlay_color'}
948 0 0 2 $w <= 0 or $h <= 0
1035 1 0 15 exists $args{'rect'} || exists $args{'x'} || exists $args{'y'}
1059 1 0 0 delete $args{'x'} // $cur->content_x
1060 0 1 0 delete $args{'w'} // $cur->width
1212 4 1 0 $enc->{'user_password'} // $enc->{'password'}
1213 4 1 0 $enc->{'owner_password'} // $user
1345 3 8 0 delete $args{'file_name'} // $file
1510 2 1 1 $degrees == 90 or $degrees == 270
1527 0 0 0 $args{'name'} // 'TT' . $obj_num