Branch Coverage

blib/lib/Sys/OsPackage.pm
Criterion Covered Total %
branch 55 252 21.8


line true false branch
117 399 22 if ref $coo
120 0 22 unless (defined $coo)
126 0 22 unless ($inst_method)
136 1 9 unless exists $_sysconf{$key}
144 1 4 unless exists $_perlconf{$key}
157 0 22 unless defined $self->platform
158 1 21 unless exists $_platconf{$key}{$self->platform}
174 0 2 unless ($class->isa("Sys::OsPackage"))
175 0 0 ref $class ? :
180 2 0 if (scalar @params > 0)
181 0 2 if (ref $params[0] eq 'HASH') { }
192 0 2 if (exists $obj_ref->{'_config'}{'debug'}) { }
0 2 elsif (exists $ENV{'SYS_OSPACKAGE_DEBUG'}) { }
197 0 2 if (deftrue($obj_ref->{'debug'}))
213 3 9 defined $value && $value ? :
226 0 14 if (defined $value)
248 40 201 if (defined $value)
279 0 0 if not defined $override or ref $override ne "HASH"
290 0 0 if not defined $perl_skip or ref $perl_skip ne "HASH"
291 0 0 deftrue($perl_skip->{$module}) ? :
302 0 0 if (defined $plat_prereq and ref $plat_prereq eq "ARRAY")
317 0 0 if (defined $value)
318 0 0 $value ? :
324 0 0 if deftrue($self->{'module_installed'}{$name})
330 0 0 if (-f $filepath)
346 0 7 if $self->debug
350 0 7 if (ref $cmd[0] eq "HASH")
361 0 7 unless CORE::open my $fh, "-|", $cmd
367 0 7 unless (CORE::close $fh)
368 0 0 if (deftrue($args{'carp_errors'}))
375 0 7 if ($? != 0)
377 0 0 if (deftrue($args{'carp_errors'}))
384 0 7 if (deftrue($args{'list'}))
388 6 1 wantarray ? :
398 0 0 if $self->debug
409 2 30 unless (defined $self->sysenv("path_list") and defined $self->sysenv("path_flag"))
414 2 10 unless -d $dir
415 0 10 unless (exists $path_flag->{$dir})
425 14 232 if (-x $filepath)
443 0 0 if $self->debug
444 0 0 if ($dir eq ".")
449 0 0 if (not exists $path_seen{$dir} and -d $dir)
451 0 0 if $self->debug
462 0 0 unless (exists $hints_seen_ref->{$item})
475 0 0 unless (defined $self->sysenv("perlbase"))
480 0 0 if (-d "$dirpath/$perlname" and -w "$dirpath/$perlname")
496 0 0 defined $need_path ? :
497 0 0 unless (-d $need_path)
499 0 0 unless CORE::mkdir $need_path, 493
513 0 0 if ($self->sysenv("os") eq "MSWin32" or $self->sysenv("os") eq "Win32")
518 0 0 unless (defined $self->sysenv("perlbase"))
520 0 0 if (build_path($self->sysenv("home"), ".local", "perl"))
538 0 0 if (exists $ENV{'PERL_LOCAL_LIB_ROOT'})
540 0 0 if ($item =~ qr"^$home/"x)
546 0 0 if (exists $ENV{'PERL5LIB'})
548 0 0 if ($item =~ qr"^$home/"x)
555 0 0 if (exists $ENV{'PATH'})
557 0 0 if ($item =~ qr"^$home/"x and $item =~ qr"/perl[5]?/"x)
565 0 0 if (-d $dirpath and -w $dirpath)
587 0 0 if (exists $ENV{'HOME'})
600 0 0 if (exists $ENV{'PATH'}) { }
611 0 0 if (exists $ENV{'PERL5LIB'}) { }
618 0 0 if (exists $ENV{'PERL_LOCAL_LIB_ROOT'}) { }
630 0 0 if (exists $ENV{'MANPATH'}) { }
638 0 0 unless ($self->quiet)
658 2 0 if (defined $uname) { }
675 2 0 if (defined $plat_packager)
681 2 0 if (defined $osrelease->osrelease_path) { }
682 0 2 if ($self->platform eq $osrelease->id) { }
687 2 0 if (defined $self->sysenv("packager"))
694 0 2 unless ($self->quiet)
709 14 18 if (my $filepath = $self->cmd_path($cmd))
719 2 0 if ($> == 0) { }
724 0 2 if (exists $sysenv->{'apk'})
733 0 2 if ($self->debug)
736 0 0 if (ref $sysenv->{$key} eq 'ARRAY') { }
739 0 0 exists $sysenv->{$key} ? :
752 0 0 if $self->debug
757 0 0 if ($? == -1) { }
0 0 elsif ($? & 127) { }
761 0 0 $? & 128 ? :
766 0 0 if ($retval != 0)
782 0 0 defined $self->sysenv('root') ? :
800 0 5 unless (exists $args{'op'})
805 0 5 if ($args{'op'} eq "implemented")
806 0 0 if ($self->sysenv('os') eq 'Linux') { }
807 0 0 unless (defined $self->platform)
811 0 0 unless (defined $self->packager)
823 0 5 if (exists $args{'pkg'} and $self->pkg_override($args{'pkg'}))
828 0 5 if (exists $args{'module'})
834 0 5 unless (eval "require " . $self->packager)
839 0 5 if $self->debug
841 0 5 unless (defined $funcref)
843 0 0 if $self->debug
857 0 0 unless $self->module_installed("Term::ANSIColor")
868 0 0 unless $self->module_installed("Term::ANSIColor")
880 0 0 unless ($self->is_root)
884 0 0 unless ($self->call_pkg_driver("op", "implemented"))
890 0 0 if not defined $pkgname or length $pkgname == 0
891 0 0 unless ($self->quiet)
906 0 0 if not defined $pkgname or length $pkgname == 0
915 0 0 if $self->debug
918 0 0 unless ($self->module_installed($name))
920 0 0 unless ($self->quiet)
927 0 0 if ($self->is_root)
928 0 0 if ($self->module_package($name))
935 0 0 unless ($done)
936 0 0 defined $self->sysenv('cpan') ? :
937 0 0 unless $self->run_cmd($cmd, $name)
955 0 0 unless (-d "build")
957 0 0 unless CORE::mkdir "build", 493
965 0 0 unless (defined $self->sysenv("$cmd"))
969 0 0 if (scalar @missing > 0)
976 0 0 unless $self->run_cmd($self->sysenv("curl"), "-L", "--output", "app-cpanminus.tar.gz", $perl_sources->{'App::cpanminus'})
985 0 0 unless CORE::chmod 0755, $cpanm_path
1002 0 0 if ($self->is_root)
1009 0 0 if (my $filepath = $self->cmd_path($dep))
1016 0 0 unless (defined $self->sysenv("cpan") or defined $self->sysenv("cpanm"))
1018 0 0 if ($self->is_root)
1019 0 0 if ($self->module_package("App::cpanminus"))
1025 0 0 unless (defined $self->sysenv("cpanm"))
1031 0 0 unless (defined $self->sysenv("cpan"))
1033 0 0 if ($self->is_root)
1034 0 0 if ($self->module_package("CPAN"))
1040 0 0 unless (defined $self->sysenv("cpan"))
1041 0 0 if ($self->run_cmd($self->sysenv("perl"), $self->sysenv("cpanm"), "CPAN"))