CPAN/Maker/Bootstrapper/Role/Provides.pm

filter: Statementstmt 54.2% 19 / 35 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 1 totaltotal 50.0% 25 / 50 CC 4 SCAR 15.9
CC
4
Cov
46%
__ANON__
12.0
cmd_provides
6.0
BEGIN
1.0
CRAP 4.9
« CPAN/Maker/Bootstrapper/Role/ScaffoldImporter.pm ↑ Summary CPAN/Maker/Bootstrapper/ConfigReader.pm »
1 package CPAN::Maker::Bootstrapper::Role::Provides;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use File::Find;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use CLI::Simple::Constants qw(:booleans);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use Role::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 ########################################################################
13 0 ▶sub cmd_provides {
Subroutine cmd_provides: not called CC=2 SCAR=17.9
Pod undocumented
14 ########################################################################
15 0 my ($self) = @_;
16  
17 0 my @provides;
18  
19 find(
20 { no_chdir => $TRUE,
21 0 ▶ wanted => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
22 0 my $file = $File::Find::name;
23  
24 return
25 0 ▶ if !-f $file;
Branch: 1 branch
BranchTrueFalseTotal
unless -f $file 0 0 0
26  
27 return
28 0 ▶ if $file !~ /[.]pm[.]in$/xsm;
Branch: 1 branch
BranchTrueFalseTotal
unless $file =~ /[.]pm[.]in$/msx 0 0 0
29  
30 0 my $module = $file;
31  
32 0 $module =~ s{^lib/}{}xsm;
33 0 $module =~ s{[.]pm[.]in$}{}xsm;
34 0 $module =~ s{/}{::}gxsm;
35  
36 0 push @provides, $module;
37  
38 0 return;
39 },
40 },
41 0 'lib'
42 );
43  
44 0 ▶ if (@provides) {
Branch: 1 branch
BranchTrueFalseTotal
if (@provides) 0 0 0
45 0 print {*STDOUT} join( "\n", sort @provides ), "\n";
46 }
47  
48 0 return $SUCCESS;
49 }
50  
51 2 1;
« CPAN/Maker/Bootstrapper/Role/ScaffoldImporter.pm ↑ Summary CPAN/Maker/Bootstrapper/ConfigReader.pm »