Branch Coverage

blib/lib/Archive/Zip/SimpleZip.pm
Criterion Covered Total %
branch 100 128 78.1


line true false branch
73 2 1053 unless $got->parse(\%PARAMS, @_)
76 209 844 if ($top) { }
80 2 415 if $got->parsed($opt)
92 1 843 if $got->parsed($opt)
98 13 1037 if (defined $e)
100 0 13 unless defined &Encode::find_encoding
101 1 12 unless defined &Encode::find_encoding($e)
144 1 213 unless @_
150 1 212 unless (defined $outValue)
158 129 83 if ($outType eq 'filename') { }
83 0 elsif ($outType eq 'buffer' or $outType eq 'handle') { }
160 1 128 if (-e $outValue and not -f _ && -w _)
165 1 127 unless $fh = "IO::File"->new(">$outValue")
178 202 4 unless $outType eq "handle"
179 1 205 if $isSTDOUT
205 194 206 unless $self->{'Open'}
208 200 6 if ($self->{'FilesWritten'} or defined $self->{'Raw'})
210 200 0 if (defined $self->{'Zip'})
212 2 198 if (defined $self->{'Raw'})
217 0 200 unless $self->{'Zip'}->_flushCompressed
218 0 200 unless $self->{'Zip'}->close
232 27 814 if (defined $filename)
237 3 18 if -d $filename or -z _ or -l $filename
245 200 641 if (not defined $self->{'Zip'}) { }
248 0 200 unless $self->{'Zip'}->_create($options, $self->{'FH'})
250 1 199 if $options->getValue("autoflush")
254 0 641 unless $self->{'Zip'}->_newStream($options)
267 3 4 if defined $_[0]
292 0 848 if $self->{'Error'}
295 0 848 unless $self->{'Open'}
298 2 846 if defined $self->{'Raw'}
308 0 29 unless $self->_stdPreq
310 1 28 unless -e $filename
313 0 28 unless -r $filename
326 0 27 if $filename eq "." or $filename eq ".."
329 26 1 if ($options->getValue("canonicalname"))
331 18 8 if (not $got->parsed('name')) { }
343 5 22 if ($got->parsed('storelinks')) { }
356 27 0 unless ($got->getValue("minimal"))
362 27 0 if ($type eq "Unix")
371 3 24 if ($isLink) { }
5 19 elsif (-d $filename) { }
19 0 elsif (-f $filename) { }
382 0 19 unless my $fh = "IO::File"->new("<$filename")
408 1 741 unless $self->_stdPreq
414 1 739 unless $got->parsed("name")
417 12 727 if $options->getValue("canonicalname")
431 0 2 unless $self->_stdPreq
437 1 1 unless $got->parsed("name")
440 1 0 if $options->getValue("canonicalname")
476 1 74 unless $self->_stdPreq
482 0 74 unless $got->parsed("name")
485 73 1 if $options->getValue("canonicalname")
532 74 0 if ref $_[0]
558 69 74 unless *$self->{'Open'}
565 74 0 if (defined *$self->{'SZ'})
577 2 68 unless $self->_stdPreq
585 0 6 unless $self->_stdPreq
593 0 6 unless $self->_stdPreq
601 0 9 unless $self->_stdPreq
609 0 0 unless $self->_stdPreq
619 2 89 unless defined defined *$self->{'SZ'} and *$self->{'SZ'}{'Open'}
623 0 89 unless *$self->{'Open'} and defined *$self->{'SZ'}{'Raw'}
626 0 89 if *$self->{'SZ'}{'Error'}