Branch Coverage

blib/lib/CAM/PDFTaxforms.pm
Criterion Covered Total %
branch 86 170 50.5


line true false branch
245 0 3 unless $objnode
253 1 2 if ($propdict->{'FT'} and $self->getValue($propdict->{'FT'}) =~ /^Btn$/o) { }
255 1 0 defined $dict->{'AS'}{'value'} ? :
260 0 1 unless wantarray
305 0 12 ref $_[0] ? :
319 0 25 unless defined $value
320 0 25 if not $key or ref $key
323 0 25 unless $objnode
335 25 0 if ($propdict->{'FT'} and $self->getValue($propdict->{'FT'}) =~ /^(Tx|Btn)$/o)
338 2 23 if ($fieldType eq 'Btn') { }
340 2 0 if ($dict->{'AS'}{'value'} =~ /^(?:Yes|Off)$/o) { }
344 0 0 if (@kidnames > 0)
348 0 0 unless $objnode
350 0 0 if ($indx == $vindx) { }
351 0 0 !$value || $value =~ /^(?:Off|No|Unchecked)$/io ? :
373 23 0 unless $dict->{'AP'}
374 23 0 unless ($dict->{'AP'}{'value'}{'N'})
387 23 0 unless $formdict->{'Subtype'}
389 23 0 if ($dict->{'Rect'})
403 23 0 unless ($formdict->{'BBox'})
430 23 0 if ($propdict->{'DA'})
440 23 0 if ($da =~ m[ \s*/([\w-]+)\s+([.\d]+)\s+Tf.*? \z ]mosx)
444 23 0 if ($fontname)
446 0 23 if ($propdict->{'DR'})
459 22 1 if ($propdict->{'Ff'})
474 23 0 if ($propdict->{'Q'})
477 1 10 $q == 1 ? :
12 11 $q == 2 ? :
481 0 23 if $flags{'Password'}
483 0 23 if ($fontmetrics and not $fontsize)
492 0 0 if $w and $w > $stringwidth
499 0 0 if $fontwidth > $maxwidth
502 23 0 if ($fontsize)
513 0 23 if ($flags{'Multiline'}) { }
523 0 0 $fontsize ? :
529 0 0 if $flags{'Justify'} ne 'left'
535 13 10 if ($flags{'Justify'} ne 'left')
539 0 13 if ($stringwidth or $fontmetrics) { }
548 0 13 if $diff < 0
550 1 12 if ($flags{'Justify'} eq 'center') { }
12 0 elsif ($flags{'Justify'} eq 'right') { }
567 0 23 ref $opts{'background_color'} ? :
0 23 $opts{'background_color'} eq 'none' ? :
569 23 0 $background_color ? :
574 23 0 unless ($fieldType eq 'Btn')
583 23 0 if (@rsrcs > 0)
584 23 0 unless $formdict->{'Resources'}
586 23 0 unless ($rdict->{'ProcSet'})
595 23 0 unless $rdict->{'Font'}
608 0 23 unless (exists $ifdict->{'DR'})
616 0 23 unless ($fobjnum)
646 218 2 defined $parentname ? :
649 218 2 if (defined $parentname and $parentname ne '') { }
652 0 218 unless $parent
654 214 4 unless exists $dict->{'Kids'}
660 0 2 unless $root
662 0 2 unless exists $parent->{'Fields'}
670 0 218 if (not ref $kid or ref $kid ne 'CAM::PDF::Node' or $kid->{'type'} ne 'reference')
678 218 0 if exists $dict->{'T'}
682 0 218 if exists $dict->{'TU'}
685 4 214 if (@kidnames > 0)
710 0 246 unless defined $fieldname
712 0 246 unless (exists $self->{'formcache'}{$fieldname})
716 0 0 if ($fieldname =~ / [.] /msx) { }
720 0 0 if $fieldname =~ s/ \A(.*)[.]([^.]+)\z /$2/msx
721 0 0 unless $parentname
723 0 0 unless $parent
725 0 0 unless exists $dict->{'Kids'}
731 0 0 unless $root
733 0 0 unless $parent
735 0 0 unless exists $dict->{'Fields'}
745 0 0 if exists $dict->{'T'}
746 0 0 if exists $dict->{'TU'}
765 0 22413 unless (ref $objnode)
772 0 22413 unless defined $key and $key
779 1272 0 $key eq 'object' ? :
1607 1272 $key eq 'dictionary' ? :
625 2879 $key eq 'array' ? :
4167 3504 $key eq 'label' ? :
0 7671 $key eq 'null' ? :
14 7671 $key eq 'boolean' ? :
2600 7685 $key eq 'reference' ? :
11463 10285 $key eq 'number' ? :
161 21748 $key eq 'hexstring' ? :
504 21909 $key eq 'string' ? :