| 1 | 3 | ▶ | use 5.10.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package Map::Metro::Plugin::Hook::StreamStations; | ||
| 6 | |||
| 7 | # ABSTRACT: Prints stations as they are parsed | ||
| 8 | 3 | our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY | |
| 9 | 3 | our $VERSION = '0.2405'; | |
| 10 | |||
| 11 | 3 | ▶ | use Map::Metro::Elk; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 3 | ▶ | use Types::Standard qw/ArrayRef/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 3 | has station_names => ( | |
| 15 | is => 'rw', | ||
| 16 | isa => ArrayRef, | ||
| 17 | traits => ['Array'], | ||
| 18 | handles => { | ||
| 19 | add_station_name => 'push', | ||
| 20 | all_station_names => 'elements', | ||
| 21 | get_station_name => 'get', | ||
| 22 | }, | ||
| 23 | ); | ||
| 24 | |||
| 25 | 0 | ▶ | sub register { |
|
Subroutine
register: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 26 | 0 | ▶ | before_add_station => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 27 | 0 | my $self = shift; | |
| 28 | 0 | my $station = shift; | |
| 29 | |||
| 30 | 0 | say $station->name; | |
| 31 | 0 | $self->add_station_name($station->name); | |
| 32 | 0 | }; | |
| 33 | } | ||
| 34 | |||
| 35 | 3 | __PACKAGE__->meta->make_immutable; | |
| 36 | |||
| 37 | 3 | 1; | |
| 38 | |||
| 39 | __END__ | ||