CBuilder.pm

filter: Statementstmt 95.0% 38 / 40 Branchbran 50.0% 3 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 85.0% 51 / 60 CC 2 SCAR 1.8
CC
2
Cov
86%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« CBuilder/Platform/Unix.pm ↑ Summary
1 package ExtUtils::CBuilder;
2 4 $ExtUtils::CBuilder::VERSION = '0.280224';
3 4 ▶use File::Spec ();
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use File::Path ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use File::Basename ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use Perl::OSType qw/os_type/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 # We only use this once - don't waste a symbol table entry on it.
13 # More importantly, don't make it an inheritable method.
14 my $load = sub {
15 4 ▶ my $mod = shift;
Subroutine __ANON__: called CC=2 SCAR=7.0
16 4 ▶ eval "use $mod";
Subroutine BEGIN: called CC=1 SCAR=0.0
17 4 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 4 4
18 4 @ISA = ($mod);
19 4 };
20  
21 {
22 4 my @package = split /::/, __PACKAGE__;
23  
24 4 my $ostype = os_type();
25  
26 4 ▶ if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) {
Branch: 2 branches
BranchTrueFalseTotal
if (grep {-e 'File::Spec'->catfile($_, @package, 'Platform', $^O) . '.pm';} @INC) { } 0 4 4
elsif ($ostype and grep {-e 'File::Spec'->catfile($_, @package, 'Platform', $ostype) . '.pm';} @INC) { } 4 0 4
27 0 $load->(__PACKAGE__ . "::Platform::$^O");
28  
29 ▶ } elsif ( $ostype &&
Condition33%1/3
$ostype and grep {-e "File::Spec"->catfile($_, @package, "Platform", $ostype) . '.pm';} @INC
!ll&&!rl&&r
004
MC/DC0%0/2
$ostype and grep {-e "File::Spec"->catfile($_, @package, "Platform", $ostype) . '.pm';} @INC
$ostype grep {-e "File::Spec"->catfile($_, @package, "Platform", $ostype) . '.pm';} @INC
Truth table33%1/3
A and B
A= $ostypeB= grep {-e "File::Spec"->catfile($_, @package, "Platform", $ostype) . '.pm';} @INC
ABresult
0X0
100
111
30 32 grep {-e File::Spec->catfile($_, @package, 'Platform', $ostype) . '.pm'} @INC) {
31 4 $load->(__PACKAGE__ . "::Platform::$ostype");
32  
33 } else {
34 0 $load->(__PACKAGE__ . "::Base");
35 }
36 }
37  
38 4 1;
39 __END__
« CBuilder/Platform/Unix.pm ↑ Summary