Branch Coverage

blib/lib/Sys/OsPackage.pm
Criterion Covered Total %
branch 57 258 22.0


line true false branch
122 534 22 if ref $coo
125 0 22 unless (defined $coo)
131 0 22 unless ($inst_method)
141 1 9 unless exists $_sysconf{$key}
149 1 4 unless exists $_perlconf{$key}
162 0 22 unless defined $self->platform
163 1 21 unless exists $_platconf{$key}{$self->platform}
179 0 2 unless ($class->isa(__PACKAGE__))
180 0 0 ref $class ? :
185 2 0 if (scalar @params > 0)
186 0 2 if (ref $params[0] eq 'HASH') { }
197 0 2 if (exists $obj_ref->{'_config'}{'debug'}) { }
0 2 elsif (exists $ENV{'SYS_OSPACKAGE_DEBUG'}) { }
202 0 2 if (deftrue($obj_ref->{'debug'}))
218 8 19 defined $value && $value ? :
231 0 24 if (defined $value)
273 5 5 if ($self->sudo and not $self->is_root)
286 45 246 if (defined $value)
317 0 0 if not defined $override or ref $override ne "HASH"
328 0 0 if not defined $perl_skip or ref $perl_skip ne "HASH"
329 0 0 deftrue($perl_skip->{$module}) ? :
340 0 0 if (defined $plat_prereq and ref $plat_prereq eq "ARRAY")
359 0 0 if (-f $filepath)
367 0 0 if (defined $value)
368 0 0 if ($found and $value)
384 0 7 if $self->debug
388 0 7 if (ref $cmd[0] eq "HASH")
399 0 7 unless CORE::open my $fh, "-|", $cmd
405 0 7 unless (CORE::close $fh)
406 0 0 if (deftrue($args{'carp_errors'}))
413 0 7 if ($? != 0)
416 0 0 if (deftrue($args{'carp_errors'}))
423 0 7 if (deftrue($args{'list'}))
428 6 1 wantarray ? :
438 0 0 if $self->debug
449 2 30 unless (defined $self->sysenv("path_list") and defined $self->sysenv("path_flag"))
454 2 10 unless -d $dir
455 0 10 unless (exists $path_flag->{$dir})
465 14 238 if (-x $filepath)
483 0 0 if $self->debug
484 0 0 if ($dir eq ".")
491 0 0 if (not exists $path_seen{$dir} and -d $dir)
493 0 0 if $self->debug
504 0 0 unless (exists $hints_seen_ref->{$item})
517 0 0 unless (defined $self->sysenv("perlbase"))
522 0 0 if (-d "$dirpath/$perlname" and -w "$dirpath/$perlname")
538 0 0 defined $need_path ? :
539 0 0 unless (-d $need_path)
541 0 0 unless CORE::mkdir $need_path, 493
555 0 0 if ($self->sysenv("os") eq "MSWin32" or $self->sysenv("os") eq "Win32")
560 0 0 unless (defined $self->sysenv("perlbase"))
563 0 0 if (build_path($self->sysenv("home"), ".local", "perl"))
581 0 0 if (exists $ENV{'PERL_LOCAL_LIB_ROOT'})
583 0 0 if ($item =~ qr"^$home/"x)
589 0 0 if (exists $ENV{'PERL5LIB'})
591 0 0 if ($item =~ qr"^$home/"x)
598 0 0 if (exists $ENV{'PATH'})
600 0 0 if ($item =~ qr"^$home/"x and $item =~ qr"/perl[5]?/"x)
608 0 0 if (-d $dirpath and -w $dirpath)
630 0 0 if (exists $ENV{'HOME'})
643 0 0 if (exists $ENV{'PATH'}) { }
654 0 0 if (exists $ENV{'PERL5LIB'}) { }
661 0 0 if (exists $ENV{'PERL_LOCAL_LIB_ROOT'}) { }
673 0 0 if (exists $ENV{'MANPATH'}) { }
682 0 0 unless ($self->quiet)
702 2 0 if (defined $uname) { }
721 2 0 if (defined $plat_packager)
727 2 0 if (defined $osrelease->osrelease_path) { }
728 0 2 if ($self->platform eq $osrelease->id) { }
733 2 0 if (defined $self->sysenv("packager"))
740 0 2 unless ($self->quiet)
755 14 18 if (my $filepath = $self->cmd_path($cmd))
765 2 0 if ($> == 0) { }
771 0 2 if (exists $sysenv->{'apk'})
781 0 2 if ($self->debug)
784 0 0 if (ref $sysenv->{$key} eq 'ARRAY') { }
787 0 0 exists $sysenv->{$key} ? :
800 0 0 if $self->debug
805 0 0 if ($? == -1) { }
0 0 elsif ($? & 127) { }
809 0 0 $? & 128 ? :
814 0 0 if ($retval != 0)
848 0 15 unless (exists $args{'op'})
853 0 15 if ($args{'op'} eq "implemented")
854 0 0 if ($self->sysenv('os') eq 'Linux') { }
855 0 0 unless (defined $self->platform)
860 0 0 unless (defined $self->packager)
874 0 15 if (exists $args{'pkg'} and $self->pkg_override($args{'pkg'}))
879 0 15 if (exists $args{'module'})
885 0 15 unless (eval 'require ' . $self->packager)
891 0 15 if $self->debug
893 0 15 unless (defined $funcref)
896 0 0 if $self->debug
910 0 0 unless $self->module_installed("Term::ANSIColor")
921 0 0 unless $self->module_installed("Term::ANSIColor")
933 0 0 unless ($self->is_root or $self->sudo)
938 0 0 unless ($self->call_pkg_driver("op", "implemented"))
944 0 0 if not defined $pkgname or length $pkgname == 0
945 0 0 unless ($self->quiet)
962 0 0 if not defined $pkgname or length $pkgname == 0
972 0 0 if $self->debug
976 0 0 if ($result) { }
977 0 0 if $self->debug
981 0 0 unless ($self->quiet)
987 0 0 if ($self->is_root or $self->sudo)
988 0 0 if ($self->module_package($name))
994 0 0 unless ($result)
996 0 0 if (defined $self->sysenv('cpan')) { }
998 0 0 if $self->notest
1001 0 0 if $self->notest
1005 0 0 unless $self->run_cmd($cmd, @test_param, $name)
1010 0 0 if $self->debug
1024 0 0 unless (-d "build")
1026 0 0 unless CORE::mkdir "build", 493
1034 0 0 unless (defined $self->sysenv("$cmd"))
1038 0 0 if (scalar @missing > 0)
1044 0 0 unless $self->run_cmd($self->sysenv("curl"), "-L", "--output", "app-cpanminus.tar.gz", $perl_sources->{'App::cpanminus'})
1052 0 0 unless CORE::chmod 0755, $cpanm_path
1069 0 0 if ($self->is_root)
1077 0 0 if (my $filepath = $self->cmd_path($dep))
1084 0 0 unless (defined $self->sysenv("cpan") or defined $self->sysenv("cpanm"))
1087 0 0 if ($self->is_root)
1088 0 0 if ($self->module_package("App::cpanminus"))
1094 0 0 unless (defined $self->sysenv("cpanm"))
1100 0 0 unless (defined $self->sysenv("cpan"))
1103 0 0 if ($self->is_root)
1104 0 0 if ($self->module_package("CPAN"))
1110 0 0 unless (defined $self->sysenv("cpan"))
1111 0 0 if ($self->run_cmd($self->sysenv("perl"), $self->sysenv("cpanm"), "CPAN"))