Branch Coverage

lib/Archive/Tar/File.pm
Criterion Covered Total %
branch 51 82 62.2


line true false branch
48 830 32833 if @_
189 36 0 $what eq 'data' ? :
16 36 $what eq 'file' ? :
292 52 $what eq 'chunk' ? :
205 0 292 unless my $chunk = shift()
217 4380 292 unless $s eq "size"
218 2044 2628 $v ? :
224 0 292 if (substr($entry{'size'}, 0, 1) eq "\200") { }
235 0 292 if $obj->magic =~ /\W/
240 0 292 if not length $obj->type or $obj->type =~ /\W/
241 0 292 if $obj->is_file and $obj->name =~ m[/$]
253 0 16 unless defined $path
259 15 1 unless ($type == 5)
262 0 15 unless ($fh->open($path))
265 0 0 if $type == 2
309 1 15 if $type == 5 or $type == 2
329 0 16 $type == 2 && 1 ? :
348 0 36 unless defined $path
349 1 35 unless defined $data
373 22 13 if ($opt and ref $opt eq "HASH")
377 0 31 unless exists $obj->{$key}
400 22 127 if $self->is_dir and not length $file
421 0 16 unless defined $file
423 0 16 if -l $file
425 15 1 if -f _
427 1 0 if -d _
429 0 0 if -p _
431 0 0 if -S _
433 0 0 if -b _
435 0 0 if -c _
438 0 0 if $file eq "././\@LongLink"
486 1221 214 unless defined $self->prefix and length $self->prefix
490 2 212 if $self->name =~ m[/$]
517 215 0 unpack('%16C*', $raw) == $self->chksum || unpack('%16c*', $raw) == $self->chksum ? :
532 83 25 defined $self->data && length $self->data ? :
596 0 12 unless defined $path
617 0 1 unless defined $mode and $mode =~ /^[0-7]{1,4}$/
635 0 12 unless defined $uname
637 0 12 if (-1 != index($uname, ':')) { }
640 7 5 if @_ > 0
644 6 6 if $gname