ExtUtils/FakeConfig.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 65.6% 21 / 32 CC 5 SCAR 23.7
CC
5
Cov
63%
find_program
20.0
import
2.0
BEGIN
1.0
CRAP 10.8
↑ Summary Config_u.pm »
1 package ExtUtils::FakeConfig;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 require File::Spec;
6 3 require Config;
7  
8 3 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 $VERSION = '0.12';
11  
12 2 ▶sub import {
Subroutine import: called CC=2 SCAR=6.9
13 2 shift;
14 2 my $obj = tied %Config::Config;
15 2 my $key;
16  
17 2 ▶ while( $key = shift ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($key = shift()) 3 2 5
18 3 $obj->{$key} = shift;
19 }
20 }
21  
22 0 ▶sub find_program {
Subroutine find_program: not called CC=4 SCAR=30.0
Pod documented
23 0 my @path = File::Spec->path();
24  
25 # we can't use Config here...
26 0 foreach my $prog ( map { ( $_, "$_.exe" ) } @_ ) {
27 0 foreach my $path ( @path ) {
28 0 ▶ if( -f File::Spec->catfile( $path, $prog ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (-f "File::Spec"->catfile($path, $prog)) 0 0 0
29 0 $prog =~ s/\.exe//;
30 0 return ( $path, $prog );
31 }
32 }
33 }
34  
35 0 return;
36 }
37  
38 3 1;
39  
40 __END__
↑ Summary Config_u.pm »