| 1 | 1 | ▶ | use 5.14.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Dist::Zilla::Plugin::MapMetro::MintMetroFile; | ||
| 4 | |||
| 5 | # ABSTRACT: Mint station file | ||
| 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 | with 'Dist::Zilla::Role::FileGatherer'; | |
| 11 | |||
| 12 | 0 | ▶ | sub gather_files { |
|
Subroutine
gather_files: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 13 | 0 | my $self = shift; | |
| 14 | |||
| 15 | 0 | $self->add_file(Dist::Zilla::File::InMemory->new({ | |
| 16 | name => sprintf ('share/map-%s.metro', lc $self->city_name), | ||
| 17 | content => $self->map_contents, | ||
| 18 | })); | ||
| 19 | } | ||
| 20 | |||
| 21 | 0 | ▶ | sub city_name { |
|
Subroutine
city_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | 0 | my $self = shift; | |
| 23 | 0 | my $city = $self->zilla->name; | |
| 24 | 0 | $city =~ s{^Map-Metro-Plugin-Map-}{}; | |
| 25 | 0 | return $city; | |
| 26 | } | ||
| 27 | |||
| 28 | 0 | ▶ | sub map_contents { |
|
Subroutine
map_contents: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 29 | 0 | return q{--stations | |
| 30 | |||
| 31 | --lines | ||
| 32 | |||
| 33 | --transfers | ||
| 34 | |||
| 35 | --segments | ||
| 36 | }; | ||
| 37 | } | ||
| 38 | |||
| 39 | 1 | 1; | |
| 40 | |||
| 41 | __END__ | ||