Branch Coverage

lib/File/Information.pm
Criterion Covered Total %
branch 26 174 14.9


line true false branch
41 0 4 if (defined $opts{$key})
42 0 0 unless eval {
50 0 2 unless ref $self->{'store'} eq "ARRAY"
53 0 0 unless (eval {
64 0 2 if ($self->{'digest_sizelimit'} eq 'infinite') { }
68 0 2 if $self->{'digest_sizelimit'} < 0
75 0 2 unless ref $self->{'boring_extension'}
79 0 2 if (defined(my $boring_extension_add = $opts{'boring_extension_add'}))
80 0 0 unless ref $boring_extension_add
84 0 2 if (defined $opts{'digest_unsafe'})
87 0 0 unless ref $unsafe eq "ARRAY"
101 2 0 if (scalar @_ == 2) { }
117 0 0 if (scalar @_ == 2) { }
132 0 0 if (scalar @_ == 2) { }
0 0 elsif (scalar @_ == 3) { }
140 0 0 unless defined $opts{'identifier'}
142 0 0 if (not defined $opts{'type'} and ref $opts{'identifier'})
145 0 0 if ($id->isa('Data::URIID::Result')) { }
0 0 elsif ($id->isa('Data::Identifier')) { }
147 0 0 unless (defined $opts{'type'})
157 0 0 unless defined $opts{'type'}
159 0 0 if (ref $opts{'type'}) { }
0 0 elsif ($opts{'type'} eq 'uuid') { }
165 0 0 if (ref(my $id = $opts{'identifier'}))
166 0 0 if ($id->isa('Data::URIID::Result') or $id->isa('Data::Identifier')) { }
0 0 elsif ($id->isa('Data::URIID::Base')) { }
173 0 0 if ($opts{'type'} eq "8be115d2-dc2f-4a98-91e1-a6e3075cbc31")
174 0 0 unless ($opts{'identifier'} =~ /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/u)
182 0 0 if $ise eq $opts{'identifier'}
194 0 0 if $ise eq $uuid
201 0 0 unless defined $hash
202 0 0 unless defined $hash->{'pool-name-suffix'}
208 0 0 if (defined(my $extractor = eval {
209 0 0 if (defined(my $result = eval {
244 0 2 unless ($as // "") eq "File::FStore"
245 0 2 if scalar keys %opts
259 0 0 if (scalar @algos == 1 and $algos[0] =~ /^v0m /u and wantarray)
265 1 0 unless ($self->{'hash_info'})
281 1 0 unless scalar @algos
283 0 1 if not wantarray and scalar @algos != 1
287 0 14 unless $self->{'hash_info'}{$_} or $self->{'hash_info'}{$File::Information::Base::_digest_name_converter{fc $_} // ""}
291 1 0 if (wantarray) { }
304 0 2 if defined $self->{'home'}
306 0 2 if ($^O eq 'MSWin32') { }
307 0 0 if defined($home = $ENV{'USERPROFILE'}) and length $home
308 0 0 if (defined $ENV{'HOMEDRIVE'} and defined $ENV{'HOMEPATH'})
310 0 0 if length $home
314 2 0 if defined($home = $ENV{'HOME'}) and length $home
315 0 0 if defined($home = eval {
326 0 2 if (defined $xdg) { }
328 0 0 unless (defined $base and length $base)
329 0 0 if ($xdg eq 'XDG_CACHE_HOME') { }
0 0 elsif ($xdg eq 'XDG_DATA_HOME') { }
0 0 elsif ($xdg eq 'XDG_CONFIG_HOME') { }
0 0 elsif ($xdg eq 'XDG_STATE_HOME') { }
347 2 0 if ($type eq 'file') { }
358 0 2 unless $HAVE_FILE_VALUEFILE
360 2 0 unless (defined $self->{'tagpool_rc'})
365 2 0 unless (defined $self->{'tagpool_path'})
370 0 2 unless ref $self->{'tagpool_rc'}
371 0 2 unless ref $self->{'tagpool_path'}
377 0 4 if (defined $hash)
379 0 0 if (defined $hash->{$key})
388 0 0 unless (-d $path)
394 0 0 unless (-d "File::Spec"->catdir($path, $subdir))
401 0 0 unless (-f "File::Spec"->catfile($path, $subfile))
432 0 0 unless (defined $self->{'filesystems'})
439 0 0 unless ref $self->{'device_path'} eq "ARRAY"
444 0 0 if (opendir my $dir, $dir_path)
449 0 0 unless scalar @stat
450 0 0 unless S_ISBLK($stat[2])
461 0 0 if ($^O eq "MSWin32")
466 0 0 unless scalar @stat
476 0 0 if ($HAVE_UNIX_MKNOD and $^O eq "linux")
478 0 0 if (open my $mountinfo, "<", $self->{'mountinfo_path'})
485 0 0 unless defined $mount_id
494 0 0 if (not defined $entry->{'stat'} and $source =~ m[^/]u)
496 0 0 if scalar @stat
499 0 0 if (not defined $entry->{'dirstat'} and $mountpoint =~ m[^/]u)
501 0 0 if scalar @stat
504 0 0 if $mountpoint =~ m[^/]u
509 0 0 if ($source =~ m[^/]u)
538 0 0 if scalar keys %opts
540 0 0 if ($class eq 'lifecycles_name') { }
0 0 elsif ($class eq 'digest_name') { }
0 0 elsif ($class eq 'digest') { }
553 0 0 if $class eq ":all"