« 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"
MC/DC0%0/1
$profile_name ||= "default"
$profile_name
Truth table50%1/2
A
A= $profile_name
| |||||||||||||
| 26 | |||||||||||||
| 27 | # shouldn't look in user's config when testing | ||||||||||||
| 28 | 2 | ▶ | if (!$ENV{DZIL_TESTING}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 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
| |||||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 2 | return $self->$orig($profile_name); | |||||||||||
| 36 | 2 | }; | |||||||||||
| 37 | |||||||||||||
| 38 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 39 | 2 | 1; | |||||||||||
| 40 | |||||||||||||
| 41 | __END__ | ||||||||||||