blib/lib/Dist/Zilla/MintingProfile/Author/Plicease.pm

filter: Statementstmt 100% 31 / 31 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 100% 44 / 44 CC 3 SCAR 4.4
CC
3
Cov
100%
profile_dir
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« blib/lib/Dist/Zilla/Plugin/Author/Plicease/Thanks.pm ↑ Summary blib/lib/Dist/Zilla/Plugin/Author/Plicease/NoUnsafeInc.pm »
1 3 package Dist::Zilla::MintingProfile::Author::Plicease 2.81 {
2  
3 3 ▶ use 5.022;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 with qw( Dist::Zilla::Role::MintingProfile );
6 3 ▶ use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶ use File::ShareDir::Dist ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶ use Path::Tiny ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶ use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶ use experimental qw( signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶ use true;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # ABSTRACT: Minting profile for Plicease
14  
15  
16 3 ▶ sub profile_dir ( $self, $profile_name ) {
Subroutine profile_dir: called CC=3 SCAR=11.0
17 # use a dist share instead of a class share
18  
19 3 require Dist::Zilla::Plugin::Author::Plicease;
20 3 my $dir1 = Dist::Zilla::Plugin::Author::Plicease->dist_dir;
21  
22 3 ▶ my $dir2 = defined $profile_name
Branch: 1 branch
BranchTrueFalseTotal
defined $profile_name ? : 2 1 3
23 ? $dir1->child("profiles/$profile_name")
24 : $dir1->child("profiles");
25  
26 3 ▶ return $dir2 if -d $dir2;
Branch: 1 branch
BranchTrueFalseTotal
if -d $dir2 2 1 3
27  
28 1 Carp::confess "Can't find profile $profile_name via $self";
29 }
30  
31 3 __PACKAGE__->meta->make_immutable;
32 }
33  
34 __END__
« blib/lib/Dist/Zilla/Plugin/Author/Plicease/Thanks.pm ↑ Summary blib/lib/Dist/Zilla/Plugin/Author/Plicease/NoUnsafeInc.pm »