Metro/Plugin/Hook/StreamStations.pm

filter: Statementstmt 79.1% 19 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 1 totaltotal 75.0% 24 / 32 CC 1 SCAR 2.5
CC
1
Cov
79%
register
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.3
« Metro/Exceptions.pm ↑ Summary Metro/Graph/Segment.pm »
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__
« Metro/Exceptions.pm ↑ Summary Metro/Graph/Segment.pm »