| 1 | package Dist::Zilla::Role::MintingProfile 6.040; | ||
| 2 | # ABSTRACT: something that can find a minting profile dir | ||
| 3 | |||
| 4 | 2 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use Dist::Zilla::Pragmas; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | ▶ | use Dist::Zilla::Path; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 2 | ▶ | use File::ShareDir; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | #pod =head1 DESCRIPTION | ||
| 14 | #pod | ||
| 15 | #pod Plugins implementing this role should provide C<profile_dir> method, which, | ||
| 16 | #pod given a minting profile name, returns its directory. | ||
| 17 | #pod | ||
| 18 | #pod The minting profile is a directory, containing arbitrary files used during | ||
| 19 | #pod creation of new distribution. Among other things notably, it should contain the | ||
| 20 | #pod 'profile.ini' file, listing the plugins used for minter initialization. | ||
| 21 | #pod | ||
| 22 | #pod The default implementation C<profile_dir> looks in the module's | ||
| 23 | #pod L<ShareDir|File::ShareDir>. | ||
| 24 | #pod | ||
| 25 | #pod After installing your profile, users will be able to start a new distribution, | ||
| 26 | #pod based on your profile with the: | ||
| 27 | #pod | ||
| 28 | #pod $ dzil new -P Provider -p profile_name Distribution::Name | ||
| 29 | #pod | ||
| 30 | #pod =cut | ||
| 31 | |||
| 32 | 2 | requires 'profile_dir'; | |
| 33 | |||
| 34 | 2 | ▶ | around profile_dir => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 35 | 2 | my ($orig, $self, @args) = @_; | |
| 36 | 2 | path($self->$orig(@args)); | |
| 37 | 2 | }; | |
| 38 | |||
| 39 | 2 | 1; | |
| 40 | |||
| 41 | __END__ | ||