File Coverage

blib/lib/Dist/Zilla/MintingProfile/Default.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Dist::Zilla::MintingProfile::Default 6.037;
2             # ABSTRACT: Default minting profile provider
3              
4 2     2   2393 use Moose;
  2         6  
  2         24  
5             with 'Dist::Zilla::Role::MintingProfile::ShareDir';
6              
7 2     2   17031 use Dist::Zilla::Pragmas;
  2         5  
  2         22  
8              
9 2     2   16 use namespace::autoclean;
  2         4  
  2         23  
10              
11 2     2   189 use Dist::Zilla::Util;
  2         4  
  2         649  
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             around profile_dir => sub {
23             my ($orig, $self, $profile_name) = @_;
24              
25             $profile_name ||= 'default';
26              
27             # shouldn't look in user's config when testing
28             if (!$ENV{DZIL_TESTING}) {
29             my $profile_dir = Dist::Zilla::Util->_global_config_root
30             ->child('profiles', $profile_name);
31              
32             return $profile_dir if -d $profile_dir;
33             }
34              
35             return $self->$orig($profile_name);
36             };
37              
38             __PACKAGE__->meta->make_immutable;
39             1;
40              
41             __END__
42              
43             =pod
44              
45             =encoding UTF-8
46              
47             =head1 NAME
48              
49             Dist::Zilla::MintingProfile::Default - Default minting profile provider
50              
51             =head1 VERSION
52              
53             version 6.037
54              
55             =head1 DESCRIPTION
56              
57             Default minting profile provider.
58              
59             This provider looks first in the F<~/.dzil/profiles/$profile_name> directory,
60             if not found it looks among the default profiles shipped with Dist::Zilla.
61              
62             =head1 PERL VERSION
63              
64             This module should work on any version of perl still receiving updates from
65             the Perl 5 Porters. This means it should work on any version of perl
66             released in the last two to three years. (That is, if the most recently
67             released version is v5.40, then this module should work on both v5.40 and
68             v5.38.)
69              
70             Although it may work on older versions of perl, no guarantee is made that the
71             minimum required version will not be increased. The version may be increased
72             for any reason, and there is no promise that patches will be accepted to
73             lower the minimum required perl.
74              
75             =head1 AUTHOR
76              
77             Ricardo SIGNES 😏 <cpan@semiotic.systems>
78              
79             =head1 COPYRIGHT AND LICENSE
80              
81             This software is copyright (c) 2026 by Ricardo SIGNES.
82              
83             This is free software; you can redistribute it and/or modify it under
84             the same terms as the Perl 5 programming language system itself.
85              
86             =cut