| 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.2404'; | |||||||||
| 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 | sub run { | ||||||||||
| 26 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
run: not called CC=2 SCAR=17.9
| |||||||||||
| 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
| |||||||||||
| 29 | 0 | my $all = $graph->all_pairs; | |||||||||
| 30 | |||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 34 | |||||||||||
| 35 | 1 | 1; | |||||||||
| 36 | |||||||||||
| 37 | __END__ | ||||||||||
| 38 | |||||||||||
| 39 | =pod | ||||||||||
| 40 | |||||||||||
| 41 | =encoding UTF-8 | ||||||||||
| 42 | |||||||||||
| 43 | =head1 NAME | ||||||||||
| 44 | |||||||||||
| 45 | Map::Metro::Cmd::AllRoutes - Display routes for all pairs of stations | ||||||||||
| 46 | |||||||||||
| 47 | =head1 VERSION | ||||||||||
| 48 | |||||||||||
| 49 | Version 0.2404, released 2016-04-30. | ||||||||||
| 50 | |||||||||||
| 51 | =head1 SOURCE | ||||||||||
| 52 | |||||||||||
| 53 | L<https://github.com/Csson/p5-Map-Metro> | ||||||||||
| 54 | |||||||||||
| 55 | =head1 HOMEPAGE | ||||||||||
| 56 | |||||||||||
| 57 | L<https://metacpan.org/release/Map-Metro> | ||||||||||
| 58 | |||||||||||
| 59 | =head1 AUTHOR | ||||||||||
| 60 | |||||||||||
| 61 | Erik Carlsson <info@code301.com> | ||||||||||
| 62 | |||||||||||
| 63 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 64 | |||||||||||
| 65 | This software is copyright (c) 2016 by Erik Carlsson. | ||||||||||
| 66 | |||||||||||
| 67 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 68 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 69 | |||||||||||
| 70 | =cut | ||||||||||