| 1 | package CPANPLUS::Dist::YACSmoke; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 5 | $CPANPLUS::Dist::YACSmoke::VERSION = '1.06'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # Dist::Zilla: +PodWeaver | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | #ABSTRACT: CPANPLUS distribution class that integrates CPAN Testing services into CPANPLUS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 5 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 5 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 5 | ▶ | use base qw(CPANPLUS::Dist::Base); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 5 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 5 | ▶ | use CPANPLUS::Internals::Utils; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 5 | ▶ | use CPANPLUS::Internals::Constants; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 5 | ▶ | use CPANPLUS::Internals::Constants::Report; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 5 | ▶ | use CPANPLUS::Error; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 5 | ▶ | use Params::Check qw[check]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 5 | ▶ | use POSIX qw( O_CREAT O_RDWR ); # for SDBM_File | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 5 | ▶ | use version; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 5 | ▶ | use SDBM_File; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 5 | ▶ | use File::Spec::Functions; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 5 | ▶ | use CPANPLUS::YACSmoke::ReAssemble; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 5 | ▶ | use CPANPLUS::YACSmoke::IniFiles; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 5 | ▶ | use constant DATABASE_FILE => 'cpansmoke.dat'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 5 | ▶ | use constant CONFIG_FILE => 'cpansmoke.ini'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 5 | $ENV{AUTOMATED_TESTING} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 5 | $ENV{PERL_MM_USE_DEFAULT} = 1; # despite verbose setting | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 5 | my %Checked; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | my $TiedObj; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 5 | my $exclude_dists; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 5 | my $exclude_auths; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 5 | my %throw_away; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | sub _is_excluded_dist { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | ▶ | return unless $exclude_dists; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_is_excluded_dist: called CC=4 SCAR=24.4
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | my $dist = shift || return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || (return)
MC/DC0%0/1
shift() || (return)
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | return 1 if $dist =~ $exclude_dists->re(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | sub _is_excluded_auth { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 1 | ▶ | return unless $exclude_auths; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_is_excluded_auth: called CC=4 SCAR=15.2
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 1 | ▶ | my $auth = shift || return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
shift() || (return)
MC/DC0%0/1
shift() || (return)
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 1 | ▶ | return 1 if $auth =~ $exclude_auths->re(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | sub init { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 5 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: called CC=7 SCAR=22.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 5 | my $mod = $self->parent; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 5 | my $cb = $mod->parent; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 5 | $self->status->mk_accessors(qw(_prepare _create _prereqs _skipbuild)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 5 | my $conf = $cb->configure_object; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 5 | ▶ | if ( $conf->get_conf( 'prefer_makefile' ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | msg(qq{CPANPLUS is prefering Makefile.PL}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 5 | msg(qq{CPANPLUS is prefering Build.PL}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 5 | ▶ | return 1 if $TiedObj; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 5 | my $filename = catfile( $conf->get_conf('base'), DATABASE_FILE ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 5 | msg(qq{Loading YACSmoke database "$filename"}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 5 | ▶ | $TiedObj = tie( %Checked, 'SDBM_File', $filename, O_CREAT|O_RDWR, 0644 ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | or error(qq{Failed to open "$filename": $!}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 5 | my $config_file = catfile( $conf->get_conf('base'), CONFIG_FILE ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 5 | ▶ | if ( -r $config_file ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 1 | my $cfg = CPANPLUS::YACSmoke::IniFiles->new(-file => $config_file); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 1 | my @list = $cfg->val( 'CONFIG', 'exclude_dists' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 1 | ▶ | if ( @list ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | $exclude_dists = CPANPLUS::YACSmoke::ReAssemble->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | $exclude_dists->add( @list ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 1 | my @list = $cfg->val( 'CONFIG', 'exclude_auths' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 1 | ▶ | if ( @list ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 1 | $exclude_auths = CPANPLUS::YACSmoke::ReAssemble->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 1 | $exclude_auths->add( @list ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | # munge test report | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | $cb->_register_callback( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | name => 'munge_test_report', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | code => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 5 | ▶ | my $mod = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=14 SCAR=30.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 5 | ▶ | my $report = shift || ""; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
shift() || ''
MC/DC0%0/1
shift() || ''
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 5 | my $grade = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 5 | my $stack = CPANPLUS::Error->stack_as_string; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | SWITCH: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 5 | my $sv = version->new($CPANPLUS::Internals::VERSION) > version->new('0.9116'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 5 | my $installer = $mod->status->installer_type; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 5 | ▶ | if ( $sv and $installer eq 'CPANPLUS::Dist::Build' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$sv and $installer eq "CPANPLUS::Dist::Build"
MC/DC50%1/2
$sv and $installer eq "CPANPLUS::Dist::Build"
$sv
$installer eq "CPANPLUS::Dist::Build"
Truth table66%2/3
A and B
A= $svB= $installer eq "CPANPLUS::Dist::Build"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 1 | require CPANPLUS::Dist::Build; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | $sv = version->new($CPANPLUS::Dist::Build::VERSION) > version->new('0.60'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 5 | ▶ | if ( $grade ne GRADE_PASS and $stack =~ /Will not install prerequisite /s ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$grade ne "pass" and $stack =~ /Will not install prerequisite /s
MC/DC100%2/2
$grade ne "pass" and $stack =~ /Will not install prerequisite /s
$grade ne "pass"
$stack =~ /Will not install prerequisite /s
Truth table100%3/3
A and B
A= $grade ne "pass"B= $stack =~ /Will not install prerequisite /s
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 1 | $throw_away{ $mod->package_name . '-' . $mod->package_version } = 'toss'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 1 | last SWITCH; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 4 | ▶ | if ( $grade ne GRADE_PASS and $stack =~ /You may have to resolve this dependency manually\./s ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$grade ne "pass" and $stack =~ /You may have to resolve this dependency manually\./s
MC/DC0%0/2
$grade ne "pass" and $stack =~ /You may have to resolve this dependency manually\./s
$grade ne "pass"
$stack =~ /You may have to resolve this dependency manually\./s
Truth table66%2/3
A and B
A= $grade ne "pass"B= $stack =~ /You may have to resolve this dependency manually\./s
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | $throw_away{ $mod->package_name . '-' . $mod->package_version } = 'toss'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | last SWITCH; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 4 | ▶ | if ( !$sv and $grade eq GRADE_PASS ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not $sv and $grade eq "pass"
MC/DC0%0/2
not $sv and $grade eq "pass"
not $sv
$grade eq "pass"
Truth table33%1/3
not(A) and B
A= not $svB= $grade eq "pass"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | my $last = ( split /MAKE TEST passed/, $stack )[-1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | $report .= join('', 'MAKE TEST passed', $last, "\n\n"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | ### add a list of what modules have been loaded of your prereqs list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | $report .= REPORT_LOADED_PREREQS->($mod); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | ### add a list of versions of toolchain modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | $report .= REPORT_TOOLCHAIN_VERSIONS->($mod); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | $report .= REPORT_MESSAGE_FOOTER->(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | last SWITCH; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 4 | ▶ | if ( $grade ne GRADE_PASS and $stack =~ /No \'Makefile.PL\' found - attempting to generate one/s ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$grade ne "pass" and $stack =~ /No \'Makefile.PL\' found - attempting to generate one/s
MC/DC0%0/2
$grade ne "pass" and $stack =~ /No \'Makefile.PL\' found - attempting to generate one/s
$grade ne "pass"
$stack =~ /No \'Makefile.PL\' found - attempting to generate one/s
Truth table66%2/3
A and B
A= $grade ne "pass"B= $stack =~ /No \'Makefile.PL\' found - attempting to generate one/s
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | $throw_away{ $mod->package_name . '-' . $mod->package_version } = 'toss'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 5 | $report =~ s/\[MSG\].*may need to build a \'CPANPLUS::Dist::YACSmoke\' package for it as well.*?\n//sg; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 5 | $report =~ s/\[MSG\] \[[\w: ]+\] Extracted '\S*?'\n//sg; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 5 | $report .= | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | "\nThis report was machine-generated by CPANPLUS::Dist::YACSmoke $CPANPLUS::Dist::YACSmoke::VERSION.\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 5 | ▶ | if ( $ENV{PERL5_MINIYACSMOKER} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $report .= "Powered by miniyacsmoker version " . $ENV{PERL5_MINIYACSMOKER} . "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 5 | ▶ | if ( $ENV{PERL5_MINISMOKEBOX} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | $report .= "Powered by minismokebox version " . $ENV{PERL5_MINISMOKEBOX} . "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 5 | $report .= _gen_report(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 5 | return $report; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 5 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | $cb->_register_callback( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | name => 'install_prerequisite', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | code => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 1 | ▶ | my $mod = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=7 SCAR=28.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 1 | my $root = $mod->package_name .'-'. $mod->package_version; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 1 | ▶ | unless ($TiedObj) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | croak "Not connected to database!"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 1 | ▶ | while (my $arg = shift) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 1 | my $package = $arg->package_name .'-'. $arg->package_version; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | # BUG: Exclusion does not seem to work for prereqs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | # Sometimes it seems that the install_prerequisite | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | # callback is not even called! Need to investigate. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 1 | ▶ | if ( _is_excluded_dist($package) ) { # prereq on excluded list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | msg("Prereq $package is excluded"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 1 | ▶ | if ( _is_excluded_auth($arg->author->cpanid) ) { # author is on excluded list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 1 | msg("Author (" . $arg->author->cpanid . ") of prereq $package is excluded"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 1 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | my $checked = $Checked{$package}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | if (defined $checked && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $checked and $checked =~ /fail|na/
MC/DC0%0/2
defined $checked and $checked =~ /fail|na/
defined $checked
$checked =~ /fail|na/
Truth table0%0/3
A and B
A= defined $checkedB= $checked =~ /fail|na/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | #$checked =~ /aborted|fail|na/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | $checked =~ /fail|na/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | msg("Known uninstallable prereqs $package - aborting install\n"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | $Checked{$root} = "aborted"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 5 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | $cb->_register_callback( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | name => 'send_test_report', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | code => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 5 | ▶ | unless ($TiedObj) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=7 SCAR=23.7
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | exit error("Not connected to database!"); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 5 | my $mod = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 5 | my $grade = lc shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 5 | my $package = $mod->package_name .'-'. $mod->package_version; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | 5 | my $checked = $Checked{$package}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | # Did we want to throw away this report? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 5 | my $throw = delete $throw_away{ $package }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 5 | ▶ | return if $throw; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | # Simplified algorithm for reporting: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | # * don't send a report if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | # - we get the same results as the last report sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | # - it passed the last test but not now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | # - it didn't pass the last test or now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 4 | ▶ | return if (defined $checked && ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition11%1/9
defined $checked and $checked eq $grade || $checked ne "pass" && $grade ne "pass"
$checked eq $grade or $checked ne "pass" and $grade ne "pass"
$checked ne "pass" and $grade ne "pass"
MC/DC0%0/4
defined $checked and $checked eq $grade || $checked ne "pass" && $grade ne "pass"
defined $checked
$checked eq $grade
$checked ne "pass"
$grade ne "pass"
Truth table20%1/5
A and B or C and D
A= defined $checkedB= $checked eq $gradeC= $checked ne "pass"D= $grade ne "pass"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | ($checked eq $grade) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | ($checked ne 'pass' && $grade ne 'pass'))); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 4 | $Checked{$package} = $grade; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 4 | return 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | 5 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | $cb->_register_callback( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | name => 'edit_test_report', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 4 | ▶ | code => sub { return; }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 5 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 5 | return 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | sub create { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | 5 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: called CC=6 SCAR=25.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | 5 | my $mod = $self->parent; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 5 | my $dist_cpan = $mod->status->dist_cpan; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 5 | ▶ | if ( $dist_cpan->status->created ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | my %hash = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | my $conf = $mod->parent->configure_object; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | my $args; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 0 | my($force,$verbose,$prereq_target,$prereq_format, $prereq_build); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | { local $Params::Check::ALLOW_UNKNOWN = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | my $tmpl = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | force => { default => $conf->get_conf('force'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | store => \$force }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | verbose => { default => $conf->get_conf('verbose'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | store => \$verbose }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | prereq_target => { default => '', store => \$prereq_target }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | prereq_format => { #default => $self->status->installer_type, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | default => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | store => \$prereq_format }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | prereq_build => { default => 0, store => \$prereq_build }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | $args = check( $tmpl, \%hash ) or return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | ▶ | return 0 unless | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | $self->_resolve_prereqs( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | force => $force, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | format => $prereq_format, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | verbose => $verbose, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | prereqs => $mod->status->prereqs, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | target => $prereq_target, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | prereq_build => $prereq_build, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | $mod->add_to_includepath(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 5 | my $package = $mod->package_name .'-'. $mod->package_version; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 5 | msg(qq{Checking for previous PASS result for "$package"}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 5 | my $checked = $Checked{$package}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | # Don't propagate 'skiptest' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 5 | my %args = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 5 | delete $args{skiptest}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 5 | @_ = %args; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | 5 | ▶ | if ( $checked and $checked eq 'pass' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$checked and $checked eq "pass"
MC/DC0%0/2
$checked and $checked eq "pass"
$checked
$checked eq "pass"
Truth table33%1/3
A and B
A= $checkedB= $checked eq "pass"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | msg(qq{Found previous PASS result for "$package" skipping tests.}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | push @_, skiptest => 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 5 | $self->SUPER::create( @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | sub _env_report { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 5 | ▶ | my @env_vars= qw( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_env_report: called CC=6 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | /PERL/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | /LC_/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | /HARNESS/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | CFLAGS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | LDFLAGS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | LANG | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | LANGUAGE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | PATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | SHELL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | COMSPEC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | TERM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | AUTOMATED_TESTING | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | NONINTERACTIVE_TESTING | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | AUTHOR_TESTING | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | RELEASE_TESTING | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | INCLUDE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | LIB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | LD_LIBRARY_PATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | PROCESSOR_IDENTIFIER | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | NUMBER_OF_PROCESSORS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 5 | my @vars_found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 5 | for my $var ( @env_vars ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 100 | ▶ | if ( $var =~ m{^/(.+)/$} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 15 | push @vars_found, grep { /$1/ } keys %ENV; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 85 | ▶ | push @vars_found, $var if exists $ENV{$var}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 5 | my $report = ""; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 5 | for my $var ( sort @vars_found ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 80 | ▶ | $report .= " $var = $ENV{$var}\n" if defined $ENV{$var}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 5 | return $report; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | sub _special_vars_report { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 5 | ▶ | my $special_vars = << "HERE"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_special_vars_report: called CC=3 SCAR=16.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | Perl: \$^X = $^X | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | UID: \$< = $< | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | EUID: \$> = $> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | GID: \$( = $( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | EGID: \$) = $) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | HERE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | 5 | ▶ | if ( $^O eq 'MSWin32' && eval "require Win32" ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$^O eq "MSWin32" and eval "require Win32"
MC/DC0%0/2
$^O eq "MSWin32" and eval "require Win32"
$^O eq "MSWin32"
eval "require Win32"
Truth table33%1/3
A and B
A= $^O eq "MSWin32"B= eval "require Win32"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | my @getosversion = Win32::GetOSVersion(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | my $getosversion = join(", ", @getosversion); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | $special_vars .= " Win32::GetOSName = " . Win32::GetOSName() . "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | $special_vars .= " Win32::GetOSVersion = $getosversion\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | 0 | $special_vars .= " Win32::IsAdminUser = " . Win32::IsAdminUser() . "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | 5 | return $special_vars; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | sub _gen_report { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 5 | ▶ | my $env_vars = _env_report; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_gen_report: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | 5 | my $special_vars = _special_vars_report(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 5 | my $return = << "ADDREPORT"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | ------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | ENVIRONMENT AND OTHER CONTEXT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | ------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | Environment variables: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | $env_vars | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | Perl special variables (and OS-specific diagnostics, for MSWin32): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | $special_vars | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | ------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | ADDREPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 5 | return $return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | 5 | 'Yakkity Yac'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||