Branch Coverage

lib/PDF/Burst.pm
Criterion Covered Total %
branch 29 76 38.1


line true false branch
13 138 0 if $PDF::Burst::DEBUG
32 0 12 unless $_path
34 2 10 unless my($abs, $abs_loc, $filename, $filename_only, $ext) = _path_segments($_path)
38 3 7 if ($_abs_loc)
39 0 3 unless -d $_abs_loc
47 0 10 unless $groupname =~ /\w/
51 0 10 unless $ext =~ /\.pdf$/i
70 2 8 unless my($abs, $abs_loc, $filename, $filename_only, $ext, $groupname) = _args(@_)
77 0 8 unless my $pdfold = 'CAM::PDF'->new($abs)
86 0 8 if ($pagecount == 1) { }
0 8 elsif ($pagecount == 0) { }
90 0 0 unless File::Copy::cp($abs, $abs_page)
112 0 42 unless my $pdf = 'CAM::PDF'->new($abs)
121 0 42 unless -f $abs_page
134 0 12 unless $_abs
137 1 11 unless my $abs = Cwd::abs_path($_abs)
142 1 10 unless -f $abs
147 0 10 unless $abs =~ m[^(.+)/+([^/]+)(\.\w{1,5})$]i
158 0 1 unless my($abs, $abs_loc, $filename, $filename_only, $ext, $groupname) = _args(@_)
167 0 1 if ($pagecount == 1) { }
0 1 elsif ($pagecount == 0) { }
171 0 0 unless (File::Copy::cp($abs, $abs_page))
188 0 4 unless ($pdf = 'PDF::API2'->new)
193 0 4 unless ($pdf->importpage($pdf_src, $i))
206 0 1 unless my($abs, $abs_loc, $filename, $filename_only, $ext, $groupname) = _args(@_)
213 1 0 unless my $bin = File::Which::which('pdftk')
225 0 0 unless system(@args) == 0
231 0 0 unless opendir DIR, $abs_loc
245 0 0 if (my $dat = _pdf_burst_doc_dat_href($doc_dat)) { }
247 0 0 if (defined $$dat{'NumberOfPages'}) { }
249 0 0 if ($pgcount != $$dat{'NumberOfPages'})
253 0 0 if ($pgcount < $$dat{'NumberOfPages'}) { }
0 0 elsif ($pgcount > $$dat{'NumberOfPages'}) { }
292 0 0 unless $doc_dat
293 0 0 unless -f $doc_dat
299 0 0 unless open FILE, '<', $doc_dat
304 0 0 unless $line =~ /^(\w+)\W+(.+)$/
311 0 0 unless defined %dat