Branch Coverage

blib/lib/CAM/PDFTaxforms.pm
Criterion Covered Total %
branch 70 144 48.6


line true false branch
245 0 3 unless $objnode
253 1 2 if ($propdict->{'FT'} and $self->getValue($propdict->{'FT'}) =~ /^Btn$/o) { }
254 1 0 $dict->{'AS'}{'value'} =~ /^Yes$/io ? :
259 1 0 unless wantarray
304 0 12 ref $_[0] ? :
318 0 25 unless defined $value
319 0 25 if not $key or ref $key
322 0 25 unless $objnode
333 23 2 unless $dict->{'V'}
337 25 0 if ($propdict->{'FT'} and $self->getValue($propdict->{'FT'}) =~ /^(Tx|Btn)$/o)
340 2 23 if ($fieldType eq 'Btn') { }
342 0 2 !$value || $value =~ /^(?:Off|No|Unchecked)$/io ? :
352 23 0 unless $dict->{'AP'}
353 23 0 unless ($dict->{'AP'}{'value'}{'N'})
364 0 23 $fieldType eq 'Btn' ? :
369 23 0 unless $formdict->{'Subtype'}
371 23 0 if ($dict->{'Rect'})
385 23 0 unless ($formdict->{'BBox'})
412 23 0 if ($propdict->{'DA'})
423 23 0 if ($da =~ m[ \s*/([\w-]+)\s+([.\d]+)\s+Tf.*? \z ]mosx)
428 23 0 if ($fontname)
430 0 23 if ($propdict->{'DR'})
443 22 1 if ($propdict->{'Ff'})
458 23 0 if ($propdict->{'Q'})
461 1 10 $q == 1 ? :
12 11 $q == 2 ? :
466 0 23 if $flags{'Password'}
468 0 23 if ($fontmetrics and not $fontsize)
477 0 0 if $w and $w > $stringwidth
484 0 0 if $fontwidth > $maxwidth
487 23 0 if ($fontsize)
498 0 23 if ($flags{'Multiline'}) { }
508 0 0 $fontsize ? :
514 0 0 if $flags{'Justify'} ne 'left'
520 13 10 if ($flags{'Justify'} ne 'left')
524 0 13 if ($stringwidth or $fontmetrics) { }
533 0 13 if $diff < 0
535 1 12 if ($flags{'Justify'} eq 'center') { }
12 0 elsif ($flags{'Justify'} eq 'right') { }
553 0 23 ref $opts{'background_color'} ? :
0 23 $opts{'background_color'} eq 'none' ? :
555 23 0 $background_color ? :
559 0 23 $fieldType eq 'Btn' ? :
560 23 0 unless ($fieldType eq 'Btn')
569 23 0 if (@rsrcs > 0)
570 23 0 unless $formdict->{'Resources'}
572 23 0 unless ($rdict->{'ProcSet'})
581 23 0 unless $rdict->{'Font'}
594 0 23 unless (exists $ifdict->{'DR'})
602 0 23 unless ($fobjnum)
632 218 2 defined $parentname ? :
635 218 2 if (defined $parentname and $parentname ne '') { }
638 0 218 unless $parent
640 214 4 unless exists $dict->{'Kids'}
646 0 2 unless $root
648 0 2 unless exists $parent->{'Fields'}
655 0 218 if (not ref $kid or ref $kid ne 'CAM::PDF::Node' or $kid->{'type'} ne 'reference')
662 218 0 if exists $dict->{'T'}
666 0 218 if exists $dict->{'TU'}
669 4 214 if (@kidnames > 0)
694 0 246 unless defined $fieldname
696 0 246 unless (exists $self->{'formcache'}{$fieldname})
700 0 0 if ($fieldname =~ / [.] /msx) { }
704 0 0 if $fieldname =~ s/ \A(.*)[.]([^.]+)\z /$2/msx
705 0 0 unless $parentname
707 0 0 unless $parent
709 0 0 unless exists $dict->{'Kids'}
715 0 0 unless $root
717 0 0 unless $parent
719 0 0 unless exists $dict->{'Fields'}
729 0 0 if exists $dict->{'T'}
730 0 0 if exists $dict->{'TU'}