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