buildtools/Number/Phone/BuildTools.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 50.0% 3 / 6 Podpod n/a totaltotal 38.1% 16 / 42 CC 4 SCAR 22.7
CC
4
Cov
39%
PM_from_manifest
20.0
files_from_manifest
2.0
modules_from_manifest
2.0
CRAP 9.7
↑ Summary blib/lib/Number/Phone/Country.pm »
1 package # hah, fooled you PAUSE
2 Number::Phone::BuildTools;
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 our @ISA = qw(Exporter);
9 1 our @EXPORT = qw(PM_from_manifest files_from_manifest modules_from_manifest);
10 1 our $without_uk = 0;
11  
12 0 ▶sub PM_from_manifest {
Subroutine PM_from_manifest: not called CC=4 SCAR=30.0
13 0 ▶ open(my $manifest, 'MANIFEST') || die("Couldn't open MANIFEST\n");
Branch: 1 branch
BranchTrueFalseTotal
open my $manifest, "MANIFEST" or die "Couldn't open MANIFEST\n" 0 0 0
14 return {
15 0 map { $_ => "blib/$_" }
16 grep {
17 0 ▶ /^lib.*\.pm$/ && (
Condition0%0/6
/^lib.*\.pm$/ && !($Number::Phone::BuildTools::without_uk && $_ =~ /UK/)
!ll&&!rl&&r
000
$Number::Phone::BuildTools::without_uk && $_ =~ /UK/
!ll&&!rl&&r
000
MC/DC0%0/3
/^lib.*\.pm$/ && !($Number::Phone::BuildTools::without_uk && $_ =~ /UK/)
/^lib.*\.pm$/ $Number::Phone::BuildTools::without_uk $_ =~ /UK/
Truth table0%0/4
A && not(B && C)
A= /^lib.*\.pm$/B= $Number::Phone::BuildTools::without_ukC= $_ =~ /UK/
ABCresult
0XX0
1110
10X1
1101
18 !$without_uk ||
19 $_ !~ /UK/
20 )
21 }
22 0 map { chomp; $_ } <$manifest>
23 };
24 }
25  
26 0 ▶sub files_from_manifest { return sort keys %{PM_from_manifest()}; }
Subroutine files_from_manifest: not called CC=1 SCAR=6.9
27  
28 0 ▶sub modules_from_manifest {
Subroutine modules_from_manifest: not called CC=1 SCAR=6.9
29 return map {
30 0 s/(^lib\/|\.pm$)//g;
31 0 s/\//::/g;
32 0 $_
33 } files_from_manifest();
34 }
35  
36 1 1;
↑ Summary blib/lib/Number/Phone/Country.pm »