Branch Coverage

blib/lib/Sys/Export/ISO9660.pm
Criterion Covered Total %
branch 127 218 58.2


line true false branch
55 2 0 &isa_handle($attrs[0]) ? :
0 2 &isa_hash($attrs[0]) ? :
3 2 @attrs != 1 ? :
83 1 2 if (@_ > 1) { }
84 4 10 if (@_ > 1) { }
92 1 10 if (@_ > 1) { }
95 0 1 unless $label =~ /^[A-Z0-9_ ]{0,32}\z/u
102 0 10 if (@_ > 1) { }
105 0 0 unless $label =~ m[^ [- !"%&'()*+,./0-9:;<=>?A-Z_]{0,32} \z]ux
112 0 10 if (@_ > 1) { }
115 0 0 unless $label =~ /^[A-Z0-9_ ]{0,64}\z/u
121 0 10 if (@_ > 1) { }
0 10 if (@_ > 1) { }
0 10 if (@_ > 1) { }
126 0 0 unless (builtin::blessed($x) and $x->can("device_offset"))
128 0 0 unless $x =~ m[^ [- !"%&'()*+,./0-9:;<=>?A-Z_]{0,64} \z]ux
135 1 10 if (@_ > 1) { }
0 10 if (@_ > 1) { }
0 10 if (@_ > 1) { }
138 0 1 unless (builtin::blessed($x) and $x->can("device_offset"))
140 0 0 unless $x =~ /^ [A-Z0-9_]{1,8} (\.[A-Z0-9_]{0,3})? (;[0-9]+)? \z/ux
155 0 4 if keys %attrs
157 0 4 unless defined $platform
161 2 2 if defined $device_offset
162 1 3 if (defined $data)
164 1 0 unless ref $data
167 3 1 if defined $size
170 0 1 ($extent->size // 0) > 1474560 ? :
3 1 $platform == 239 ? :
176 3 1 $media_type == 0 ? :
179 3 1 $platform == 239 ? :
180 3 0 $platform == 239 ? :
0 3 $platform == 2 ? :
0 3 $platform == 1 ? :
1 3 $platform == 0 ? :
186 3 1 unless ($self->{'boot_catalog'})
191 0 3 unless $self->{'_free_invlist'}[0] == 19
197 4 0 unless (defined $sec)
217 1 0 if (@_ > 1) { }
238 1 1 if &isa_array($spec)
242 0 2 unless defined $spec->{'uname'} or defined $spec->{'name'}
243 0 2 unless defined $spec->{'mode'}
249 0 2 if length $path > 253
253 0 2 if @path > 7
260 0 0 if ($ent) { }
262 0 0 unless $ent->{'dir'}
265 0 0 $parent == $self->root ? :
273 2 0 if (S_ISREG($spec->{'mode'})) { }
0 0 elsif (S_ISDIR($spec->{'mode'})) { }
276 0 2 if defined $data_ref and not ref $data_ref
278 0 2 if ($size) { }
1 1 elsif (defined $data_ref) { }
280 0 0 if $data_ref and length $$data_ref != $size
293 0 0 if $cur and $cur->{'file'}
295 0 0 if ($cur)
311 0 2 if ($file->is_dir)
321 0 0 $ent->{'file'}->is_dir ? :
0 0 !$ent->{'file'} ? :
0 2 if $Sys::Export::ISO9660::log->is_debug
335 1 4 unless ($fh)
336 0 1 unless defined $self->filename
337 0 1 unless open $fh, "+>", $self->filename
342 3 2 if (-s $fh < $size)
343 0 3 unless truncate $fh, $size
346 1 4 unless ($self->filehandle)
347 0 1 unless $fh->close
354 0 39 unless defined $file->size or defined $file->data
356 34 5 if $size and defined $file->data
373 3 2 if $boot_catalog
381 3 2 if ($boot_catalog)
414 35 30 if ($sec_size and not defined $_->device_offset) { }
26 8 elsif ($sec_size and $_->device_offset > 0) { }
425 6 2 if (my $boot_catalog = $self->boot_catalog)
457 35 0 if (not $lim or $lim - $start > $sector_count)
461 0 0 if ($lim - $start == $sector_count)
476 25 4 if $start >= $reserve_lim
478 1 3 if $lim and $lim <= $reserve_lba
480 1 2 if ($start >= $reserve_lba) { }
481 1 0 if (not $lim or $reserve_lim < $lim) { }
486 0 0 if $reserve_lim == $lim
492 2 0 if $i + 1 == $inv->$#*
508 0 8 unless $dir->is_root
514 0 3 $is_dir ? :
515 0 3 if _sector_of($pos) != _sector_of($size)
519 0 3 if _sector_of($pos) != _sector_of($joliet)
522 0 3 if ($is_dir)
579 0 5 if (my $parent = $dir->parent)
590 0 2 if _sector_of($pos) != _sector_of(length $data)
595 0 2 $is_dir ? :
0 2 $_->{'dir'} ? :
599 0 2 if _sector_of($pos) != _sector_of(length $joliet)
603 0 5 unless _round_to_whole_sector(length $data) == $dir->file->size
605 0 5 unless _round_to_whole_sector(length $joliet) == $dir->joliet_file->size
654 0 2 if ($ent->{'dir'})
669 0 5 unless length $le == $path_tables->{'le'}->size and length $be == $path_tables->{'be'}->size and length $jle == $path_tables->{'jle'}->size and length $jbe == $path_tables->{'jbe'}->size
739 90 302 if ($code eq "E")
740 45 45 if ($charset)
746 177 215 if (uc $code eq "A")
747 0 177 unless utf8::is_utf8($val) or utf8::downgrade($val, 1)
749 0 177 if length $val > $size
786 0 30 if builtin::blessed($thing) and $thing->can("device_offset")
809 5 5 $is_joliet ? :
815 2 28 if (builtin::blessed($spec) and $spec->can('device_offset')) { }
816 0 2 unless ($ent) = grep(($_->{'file'} == $spec), @{$self->root->entries})
819 28 0 unless length $spec
823 1 1 if (not $is_joliet) { }
866 0 6 unless my $boot_catalog = $self->boot_catalog
896 3 1 $s == $sections->[-1] ? :
909 0 3 if length $catalog != $boot_catalog->{'extent'}->size