Branch Coverage

lib/Archive/Tar/File.pm
Criterion Covered Total %
branch 50 82 60.9


line true false branch
48 710 31340 if @_
189 29 0 $what eq 'data' ? :
22 29 $what eq 'file' ? :
242 51 $what eq 'chunk' ? :
205 0 242 unless my $chunk = shift()
217 3630 242 unless $s eq "size"
218 1694 2178 $v ? :
224 0 242 if (substr($entry{'size'}, 0, 1) eq "\200") { }
235 0 242 if $obj->magic =~ /\W/
240 0 242 if not length $obj->type or $obj->type =~ /\W/
241 0 242 if $obj->is_file and $obj->name =~ m[/$]
253 0 22 unless defined $path
259 21 1 unless ($type == 5)
262 0 21 unless ($fh->open($path, "r"))
265 0 0 if $type == 2
309 1 21 if $type == 5 or $type == 2
329 0 22 $type == 2 && 1 ? :
348 0 29 unless defined $path
349 1 28 unless defined $data
373 16 12 if ($opt and ref $opt eq "HASH")
377 0 25 unless exists $obj->{$key}
400 13 119 if $self->is_dir and not length $file
421 0 22 unless defined $file
423 0 22 if -l $file
425 21 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 1167 206 unless defined $self->prefix and length $self->prefix
490 0 206 if $self->name =~ m[/$]
517 185 0 unpack('%16C*', $raw) == $self->chksum || unpack('%16c*', $raw) == $self->chksum ? :
532 72 15 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 (index($uname, ':') != -1) { }
640 7 5 if @_ > 0
644 6 6 if $gname