Metro/Cmd/AllRoutes.pm

filter: Statementstmt 85.7% 24 / 28 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 81.0% 30 / 37 CC 2 SCAR 8.1
CC
2
Cov
80%
run
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Metro/Cmd/Route.pm ↑ Summary Metro/Emitter.pm »
1 1 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Map::Metro::Cmd::AllRoutes;
6  
7 # ABSTRACT: Display routes for all pairs of stations
8 1 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 1 our $VERSION = '0.2405';
10  
11 1 ▶use Map::Metro::Elk;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use MooseX::App::Command;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Types::Standard qw/Str/;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 extends 'Map::Metro::Cmd';
15  
16 1 parameter cityname => (
17 is => 'rw',
18 isa => Str,
19 documentation => 'The name of the city',
20 required => 1,
21 );
22  
23 1 command_short_description 'Display routes for *all* pairs of stations (slow)';
24  
25 0 ▶sub run {
Subroutine run: not called CC=2 SCAR=17.9
26 0 my $self = shift;
27 0 my %hooks = (hooks => ['PrettyPrinter']);
28 0 ▶ my $graph = $self->cityname !~ m{\.} ? Map::Metro->new($self->cityname, %hooks)->parse : Map::Metro::Shim->new($self->cityname, %hooks)->parse;
Branch: 1 branch
BranchTrueFalseTotal
!($self->cityname =~ /\./) ? : 0 0 0
29 0 my $all = $graph->all_pairs;
30  
31 }
32  
33 1 __PACKAGE__->meta->make_immutable;
34  
35 1 1;
36  
37 __END__
« Metro/Cmd/Route.pm ↑ Summary Metro/Emitter.pm »