« Data/Password/zxcvbn/AuthorTools/BuildAdjacencyGraphs.pm
↑ Summary
Data/Password/zxcvbn/AuthorTools/PackageWriter.pm »
| 1 | package Dist::Zilla::MintingProfile::zxcvbn; | ||
| 2 | use Moose; | ||
| 3 | with 'Dist::Zilla::Role::MintingProfile'; | ||
| 4 | |||
| 5 | use File::ShareDir::Tarball 'dist_dir'; | ||
| 6 | use Path::Tiny; | ||
| 7 | |||
| 8 | use namespace::autoclean; | ||
| 9 | our $VERSION = '1.0.2'; # VERSION | ||
| 10 | # ABSTRACT: dzil minting profile for zxcvbn distributions | ||
| 11 | |||
| 12 | sub profile_dir { | ||
| 13 | my ($self, $profile_name) = @_; | ||
| 14 | |||
| 15 | my $dist_dir = eval { dist_dir('Data-Password-zxcvbn-AuthorTools') } || path(__FILE__)->parent(5)->child('share'); | ||
| 16 | my $profile_dir = path( $dist_dir )->child( 'minting-profiles', $profile_name ); | ||
| 17 | |||
| 18 | return $profile_dir if -d $profile_dir; | ||
| 19 | |||
| 20 | confess "Can't find profile $profile_name via $self (checked '$profile_dir')"; | ||
| 21 | } | ||
| 22 | |||
| 23 | __PACKAGE__->meta->make_immutable; | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | __END__ |