| 1 | package Dist::Zilla::MintingProfile::AppKitX; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Mints a new AppKitX component | ||||||||||
| 4 | |||||||||||
| 5 | 1 | our $VERSION = '0.04'; | |||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | with 'Dist::Zilla::Role::MintingProfile'; | |||||||||
| 8 | 1 | ▶ | use File::ShareDir; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Path::Class; # sadly, we still need to use Path::Class :( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | sub profile_dir | ||||||||||
| 14 | 0 | ▶ | { | ||||||||
|
Subroutine
profile_dir: not called CC=3 SCAR=24.8
| |||||||||||
| 15 | 0 | my ($self, $profile_name) = @_; | |||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | die 'minting requires perl 5.014' unless $] >= 5.013002; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | my $dist_name = 'Dist-Zilla-MintingProfile-AppKitX'; | |||||||||
| 20 | 0 | my $profile_dir = dir( File::ShareDir::dist_dir($dist_name) ) | |||||||||
| 21 | ->subdir( 'profiles', $profile_name ); | ||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | return $profile_dir if -d $profile_dir; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 0 | confess "Can't find profile $profile_name via $self: it should be in $profile_dir"; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||
| 31 | |||||||||||
| 32 | __END__ | ||||||||||