Plugin/MapMetro/MintMetroFile.pm

filter: Statementstmt 56.2% 9 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 45.8% 11 / 24 CC 1 SCAR 4.7
CC
1
Cov
56%
gather_files
2.0
city_name
2.0
map_contents
2.0
CRAP 1.6
« Plugin/MapMetro/MintMapFiles.pm ↑ Summary MintingProfile/MapMetro/Map.pm »
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__
« Plugin/MapMetro/MintMapFiles.pm ↑ Summary MintingProfile/MapMetro/Map.pm »