Opendata/GTFS/Type/Stop.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 32 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Opendata/GTFS/Type/Shape.pm ↑ Summary Opendata/GTFS/Type/StopTime.pm »
1 4 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Opendata::GTFS::Type::Stop;
6  
7 # ABSTRACT: Stop
8 4 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 4 our $VERSION = '0.0202';
10  
11 4 ▶use Opendata::GTFS::Feed::Elk;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use Types::Standard qw/Maybe Str/;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 4 my @columns = qw/
15 1 stop_id
16 0 stop_code
17 1 stop_name
18 0 stop_desc
19 1 stop_lat
20 1 stop_lon
21 0 zone_id
22 0 stop_url
23 0 location_type
24 0 parent_station
25 0 stop_timezone
26 0 wheelchair_boarding
27 /;
28  
29 4 ▶for (my $i = 0; $i < $#columns; $i += 2) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < $#columns) 48 4 52
30 48 my $required = $columns[$i];
31 48 my $column = $columns[$i + 1];
32  
33 48 ▶ has $column => (
Branch: 1 branch
BranchTrueFalseTotal
$required ? : 16 32 48
34 is => 'ro',
35 isa => ($required ? Str : Maybe[Str]),
36 );
37 }
38  
39 4 __PACKAGE__->meta->make_immutable;
40  
41 4 1;
42  
43 __END__
« Opendata/GTFS/Type/Shape.pm ↑ Summary Opendata/GTFS/Type/StopTime.pm »