File Coverage

blib/lib/Dist/Zilla/Role/MintingProfile.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: something that can find a minting profile dir
2              
3             use Moose::Role;
4 2     2   2503  
  2         6  
  2         13  
5             use Dist::Zilla::Pragmas;
6 2     2   10396  
  2         12  
  2         167  
7             use namespace::autoclean;
8 2     2   19  
  2         5  
  2         15  
9             use Dist::Zilla::Path;
10 2     2   134 use File::ShareDir;
  2         7  
  2         30  
11 2     2   1695  
  2         22655  
  2         287  
12             #pod =head1 DESCRIPTION
13             #pod
14             #pod Plugins implementing this role should provide C<profile_dir> method, which,
15             #pod given a minting profile name, returns its directory.
16             #pod
17             #pod The minting profile is a directory, containing arbitrary files used during
18             #pod creation of new distribution. Among other things notably, it should contain the
19             #pod 'profile.ini' file, listing the plugins used for minter initialization.
20             #pod
21             #pod The default implementation C<profile_dir> looks in the module's
22             #pod L<ShareDir|File::ShareDir>.
23             #pod
24             #pod After installing your profile, users will be able to start a new distribution,
25             #pod based on your profile with the:
26             #pod
27             #pod $ dzil new -P Provider -p profile_name Distribution::Name
28             #pod
29             #pod =cut
30              
31             requires 'profile_dir';
32              
33             around profile_dir => sub {
34             my ($orig, $self, @args) = @_;
35             path($self->$orig(@args));
36             };
37              
38             1;
39              
40              
41             =pod
42              
43             =encoding UTF-8
44              
45             =head1 NAME
46              
47             Dist::Zilla::Role::MintingProfile - something that can find a minting profile dir
48              
49             =head1 VERSION
50              
51             version 6.028
52              
53             =head1 DESCRIPTION
54              
55             Plugins implementing this role should provide C<profile_dir> method, which,
56             given a minting profile name, returns its directory.
57              
58             The minting profile is a directory, containing arbitrary files used during
59             creation of new distribution. Among other things notably, it should contain the
60             'profile.ini' file, listing the plugins used for minter initialization.
61              
62             The default implementation C<profile_dir> looks in the module's
63             L<ShareDir|File::ShareDir>.
64              
65             After installing your profile, users will be able to start a new distribution,
66             based on your profile with the:
67              
68             $ dzil new -P Provider -p profile_name Distribution::Name
69              
70             =head1 PERL VERSION
71              
72             This module should work on any version of perl still receiving updates from
73             the Perl 5 Porters. This means it should work on any version of perl released
74             in the last two to three years. (That is, if the most recently released
75             version is v5.40, then this module should work on both v5.40 and v5.38.)
76              
77             Although it may work on older versions of perl, no guarantee is made that the
78             minimum required version will not be increased. The version may be increased
79             for any reason, and there is no promise that patches will be accepted to lower
80             the minimum required perl.
81              
82             =head1 AUTHOR
83              
84             Ricardo SIGNES 😏 <cpan@semiotic.systems>
85              
86             =head1 COPYRIGHT AND LICENSE
87              
88             This software is copyright (c) 2022 by Ricardo SIGNES.
89              
90             This is free software; you can redistribute it and/or modify it under
91             the same terms as the Perl 5 programming language system itself.
92              
93             =cut