| 1 | 1 | ▶ | use 5.14.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Dist::Zilla::Plugin::MapMetro::MintMapFiles; | ||
| 4 | |||
| 5 | # ABSTRACT: Mint files | ||
| 6 | 1 | our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY | |
| 7 | 1 | our $VERSION = '0.1501'; | |
| 8 | |||
| 9 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | extends 'Dist::Zilla::Plugin::InlineFiles'; | |
| 11 | 1 | with 'Dist::Zilla::Role::TextTemplate'; | |
| 12 | |||
| 13 | 0 | ▶ | override 'merged_section_data' => sub { |
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||
| 14 | 0 | my $self = shift; | |
| 15 | |||
| 16 | 0 | my $data = super; | |
| 17 | 0 | for my $name (keys %{ $data }) { | |
| 18 | 0 | my $city = $self->zilla->name; | |
| 19 | 0 | $city =~ s{^Map-Metro-Plugin-Map-}{}; | |
| 20 | |||
| 21 | $data->{ $name } = \$self->fill_in_string( | ||
| 22 | 0 | ${ $data->{ $name } }, { | |
| 23 | dist => \($self->zilla), | ||
| 24 | city => \$city, | ||
| 25 | plugin => \($self), | ||
| 26 | }, | ||
| 27 | ); | ||
| 28 | } | ||
| 29 | 0 | return $data; | |
| 30 | 1 | }; | |
| 31 | |||
| 32 | 1 | 1; | |
| 33 | |||
| 34 | =pod | ||
| 35 | |||
| 36 | =encoding UTF-8 | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | Dist::Zilla::Plugin::MapMetro::MintMapFiles - Mint files | ||
| 41 | |||
| 42 | =head1 VERSION | ||
| 43 | |||
| 44 | Version 0.1501, released 2021-03-29. | ||
| 45 | |||
| 46 | =head1 SOURCE | ||
| 47 | |||
| 48 | L<https://github.com/Csson/p5-Dist-Zilla-MintingProfile-MapMetro-Map> | ||
| 49 | |||
| 50 | =head1 HOMEPAGE | ||
| 51 | |||
| 52 | L<https://metacpan.org/release/Dist-Zilla-MintingProfile-MapMetro-Map> | ||
| 53 | |||
| 54 | =head1 AUTHOR | ||
| 55 | |||
| 56 | Erik Carlsson <info@code301.com> | ||
| 57 | |||
| 58 | =head1 COPYRIGHT AND LICENSE | ||
| 59 | |||
| 60 | This software is copyright (c) 2021 by Erik Carlsson. | ||
| 61 | |||
| 62 | This is free software; you can redistribute it and/or modify it under | ||
| 63 | the same terms as the Perl 5 programming language system itself. | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | __DATA__ | ||