blib/lib/Dist/Zilla/MintingProfile/Default.pm

filter: Statementstmt 100% 22 / 22 Branchbran 75.0% 3 / 4 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 91.1% 31 / 34 CC 4 SCAR 9.3
CC
4
Cov
93%
__ANON__
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« blib/lib/Dist/Zilla/Role/TextTemplate.pm ↑ Summary blib/lib/Dist/Zilla/Plugin/ModuleShareDirs.pm »
1 package Dist::Zilla::MintingProfile::Default 6.040;
2 # ABSTRACT: Default minting profile provider
3  
4 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 with 'Dist::Zilla::Role::MintingProfile::ShareDir';
6  
7 2 ▶use Dist::Zilla::Pragmas;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use Dist::Zilla::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #pod =head1 DESCRIPTION
14 #pod
15 #pod Default minting profile provider.
16 #pod
17 #pod This provider looks first in the F<~/.dzil/profiles/$profile_name> directory,
18 #pod if not found it looks among the default profiles shipped with Dist::Zilla.
19 #pod
20 #pod =cut
21  
22 2 ▶around profile_dir => sub {
Subroutine __ANON__: called CC=4 SCAR=14.0
23 2 my ($orig, $self, $profile_name) = @_;
24  
25 2 ▶ $profile_name ||= 'default';
Condition50%1/2
$profile_name ||= "default"
l!l
20
MC/DC0%0/1
$profile_name ||= "default"
$profile_name
Truth table50%1/2
A
A= $profile_name
Aresult
11
00
26  
27 # shouldn't look in user's config when testing
28 2 ▶ if (!$ENV{DZIL_TESTING}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ENV{"DZIL_TESTING"}) 1 1 2
29 1 my $profile_dir = Dist::Zilla::Util->_global_config_root
30 ->child('profiles', $profile_name);
31  
32 1 ▶ return $profile_dir if -d $profile_dir;
Branch: 1 branch
BranchTrueFalseTotal
if -d $profile_dir 0 1 1
33 }
34  
35 2 return $self->$orig($profile_name);
36 2 };
37  
38 2 __PACKAGE__->meta->make_immutable;
39 2 1;
40  
41 __END__
« blib/lib/Dist/Zilla/Role/TextTemplate.pm ↑ Summary blib/lib/Dist/Zilla/Plugin/ModuleShareDirs.pm »