Branch Coverage

blib/lib/PDF/API3/Compat/API2.pm
Criterion Covered Total %
branch 0 280 0.0


line true false branch
162 0 0 unless $$self{'pages'}{'Resources'}->is_obj($$self{'pdf'})
166 0 0 $^O eq 'os390' ? :
168 0 0 if ($opt{-'file'})
206 0 0 unless -f $file
210 0 0 unless CORE::open $fh, '+<', \$filestr
235 0 0 $^O eq 'os390' ? :
269 0 0 unless CORE::open $fh, '+<', \$file
280 0 0 $^O eq 'os390' ? :
438 0 0 if ($opt{-'fullscreen'}) { }
0 0 elsif ($opt{-'thumbs'}) { }
0 0 elsif ($opt{-'outlines'}) { }
447 0 0 if ($opt{-'singlepage'}) { }
0 0 elsif ($opt{-'onecolumn'}) { }
0 0 elsif ($opt{-'twocolumnleft'}) { }
0 0 elsif ($opt{-'twocolumnright'}) { }
462 0 0 if ($opt{-'hidetoolbar'})
465 0 0 if ($opt{-'hidemenubar'})
468 0 0 if ($opt{-'hidewindowui'})
471 0 0 if ($opt{-'fitwindow'})
474 0 0 if ($opt{-'centerwindow'})
477 0 0 if ($opt{-'displaytitle'})
480 0 0 if ($opt{-'righttoleft'})
484 0 0 if ($opt{-'afterfullscreenthumbs'}) { }
0 0 elsif ($opt{-'afterfullscreenoutlines'}) { }
492 0 0 if ($opt{-'printscalingnone'})
496 0 0 if ($opt{-'firstpage'})
499 0 0 if scalar keys %o < 1
501 0 0 if (defined $o{-'fit'}) { }
0 0 elsif (defined $o{-'fith'}) { }
0 0 elsif (defined $o{-'fitb'}) { }
0 0 elsif (defined $o{-'fitbh'}) { }
0 0 elsif (defined $o{-'fitv'}) { }
0 0 elsif (defined $o{-'fitbv'}) { }
0 0 elsif (defined $o{-'fitr'}) { }
0 0 elsif (defined $o{-'xyz'}) { }
514 0 0 unless scalar @{$o{-'fitr'};} == 4
517 0 0 unless scalar @{$o{-'xyz'};} == 3
547 0 0 if (defined $var)
561 0 0 defined $$self{'pdf'}{'Encrypt'} ? :
589 0 0 if (not defined $$self{'pdf'}{'Info'}) { }
596 0 0 if (scalar @_)
598 0 0 unless defined $opt{$k}
599 0 0 if (is_utf8 $opt{$k}) { }
611 0 0 if (defined $$self{'pdf'}{'Info'})
614 0 0 unless defined $$self{'pdf'}{'Info'}{$k}
616 0 0 if (unpack('n', $opt{$k}) == 65534 or unpack('n', $opt{$k}) == 65279)
641 0 0 if (scalar @attr > 0)
677 0 0 if (not defined $$self{'catalog'}{'Metadata'}) { }
694 0 0 if (defined $_[0])
760 0 0 if ($$opts{-'style'} eq 'Roman') { }
0 0 elsif ($$opts{-'style'} eq 'roman') { }
0 0 elsif ($$opts{-'style'} eq 'Alpha') { }
0 0 elsif ($$opts{-'style'} eq 'alpha') { }
781 0 0 if (defined $$opts{-'prefix'})
786 0 0 if (defined $$opts{-'start'})
811 0 0 if ($$self{'reopened'}) { }
0 0 elsif ($$self{' filed'}) { }
824 0 0 if (defined $$pgs{'Resources'})
831 0 0 if ($$pg{'Type'}->val =~ /^Pages$/o) { }
840 0 0 if (defined $$pg{'Resources'})
882 0 0 if ($$self{'reopened'}) { }
0 0 elsif ($$self{' filed'}) { }
898 0 0 if ($$self{'reopened'}) { }
0 0 elsif ($$self{' filed'}) { }
933 0 0 if (defined $$self{'reopened'} and $$self{'reopened'} == 1) { }
938 0 0 unless CORE::open $fh, '>', \$str
956 0 0 if defined $$self{'pdf'}
991 0 0 if ($index == 0) { }
1000 0 0 if ($index == 0) { }
0 0 elsif ($index < 0) { }
1034 0 0 if ($index == 0) { }
0 0 elsif ($index < 0) { }
1046 0 0 unless ref $page
1048 0 0 if (ref $page ne 'PDF::API3::Compat::API2::Page')
1054 0 0 if ($rotate = $page->find_prop('Rotate') and !defined($$page{' fixed'}) || $$page{' fixed'} < 1) { }
1058 0 0 if ($rotate != 0 and not $self->default('nounrotate')) { }
1061 0 0 if ($media = $page->find_prop($mediatype)) { }
1065 0 0 if $mediatype ne 'MediaBox'
1067 0 0 if ($rotate == 90) { }
0 0 elsif ($rotate == 180) { }
0 0 elsif ($rotate == 270) { }
1068 0 0 if $mediatype eq 'MediaBox'
1071 0 0 if $mediatype eq 'MediaBox'
1073 0 0 if $mediatype eq 'MediaBox'
1085 0 0 if (defined $$page{'Contents'} and !defined($$page{' fixed'}) || $$page{' fixed'} < 1)
1092 0 0 if ($self->default('pageencaps'))
1101 0 0 if ($self->default('pageencaps'))
1110 0 0 if ($$self{'forcecompress'} > 0)
1138 0 0 if (ref($obj) =~ /Objind$/)
1142 0 0 if defined $$objs{scalar $obj}
1148 0 0 if $obj->is_obj($spdf)
1152 0 0 if (ref($obj) =~ /Array$/) { }
0 0 elsif (ref($obj) =~ /Dict$/) { }
1155 0 0 if ref($k) =~ /Objind$/
1159 0 0 if scalar @keys < 1
1161 0 0 if $k =~ /^ /
1162 0 0 unless defined $$obj{$k}
1165 0 0 if ($$obj{' stream'})
1166 0 0 if ($$tobj{'Filter'}) { }
1210 0 0 unless UNIVERSAL::isa($s_pdf, 'PDF::API3::Compat::API2')
1216 0 0 if (ref $s_idx eq 'PDF::API3::Compat::API2::Page') { }
1228 0 0 unless defined $s_page->find_prop($k)
1233 0 0 unless defined $$xo{'BBox'}
1237 0 0 unless defined $$s_page{$k}
1238 0 0 if ref($$s_page{$k}) =~ /Objind$/
1241 0 0 unless defined $$s_page{$k}{$sk}
1242 0 0 if ref($$s_page{$k}{$sk}) =~ /Objind$/
1244 0 0 if $ssk =~ /^ /
1254 0 0 unless $$s_page{' fixed'} == 1
1259 0 0 if (defined $$s_page{'Contents'})
1266 0 0 if ($$k{' nofilt'}) { }
1275 0 0 if $$self{'forcecompress'} > 0
1314 0 0 unless UNIVERSAL::isa($s_pdf, 'PDF::API3::Compat::API2')
1316 0 0 if (ref $s_idx eq 'PDF::API3::Compat::API2::Page') { }
1322 0 0 if (ref $t_idx eq 'PDF::API3::Compat::API2::Page') { }
1325 0 0 if ($self->pages < $t_idx) { }
1339 0 0 if defined $$xo{'BBox'}
1343 0 0 if (exists $$s_page{'Annots'} and $$s_page{'Annots'} and $$self{'copyannots'})
1347 0 0 if (my $a = $$s_pdf{'pdf'}{'Root'}->realise->{'AcroForm'})
1379 0 0 if $AcroForm
1394 0 0 unless defined $$a{$k}
1400 0 0 if $AcroForm and $$t_a{'Subtype'}->val eq 'Widget'
1403 0 0 if $AcroForm
1648 0 0 if $opts{-'unicodemap'} == 1
1686 0 0 unless defined $opts{$o}
1695 0 0 if $opts{-'unicodemap'} == 1
1736 0 0 if $opts{-'unicodemap'} == 1
1749 0 0 if $opts{-'unicodemap'} == 1
1782 0 0 if $opts{-'unicodemap'} == 1
1827 0 0 if $opts{-'unicodemap'} == 1
2423 0 0 unless $obj->is_obj($$self{'pdf'})
2448 0 0 unless (defined $obj)
2501 0 0 if ref($dict) =~ /Objind$/
2503 0 0 unless $dict->is_obj($$self{'pdf'})
2506 0 0 if ref($$dict{$type}) =~ /Objind$/
2508 0 0 if (defined $obj)
2510 0 0 if ($force) { }
2519 0 0 if $dict->is_obj($$self{'pdf'})
2522 0 0 if $$dict{$type}->is_obj($$self{'pdf'})
2525 0 0 if $obj->is_obj($$self{'pdf'})