« 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
| |||||||||||
| 23 | ? $dir1->child("profiles/$profile_name") | ||||||||||
| 24 | : $dir1->child("profiles"); | ||||||||||
| 25 | |||||||||||
| 26 | 3 | ▶ | return $dir2 if -d $dir2; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||