File Coverage

blib/lib/Opendata/GTFS/Type/FareRule.pm
Criterion Covered Total %
statement 70 70 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 78 78 100.0


line stmt bran cond sub pod time code
1 2     2   9 use Opendata::GTFS::Standard;
  2         3  
  2         13  
2 2     2   2581 use strict;
  2         2  
  2         51  
3 2     2   8 use warnings;
  2         3  
  2         77  
4              
5             # PODNAME: Opendata::GTFS::Type::FareRule
6             # ABSTRACT: Fare rule
7              
8 2     2   3043 class Opendata::GTFS::Type::FareRule using Moose {
  2     2   46  
  2     2   12  
  2         2  
  2         124  
  2         8  
  2         3  
  2         18  
  2         561  
  2         3  
  2         14  
  2         111  
  2         3  
  2         88  
  2         10  
  2         2  
  2         168  
  2         52  
  2         11  
  2         3  
  2         12  
  2         6088  
  2         156  
  2         16  
  2         10539  
  2         4  
  2         22  
  2         6893  
  2         4  
  2         33  
  2         153  
  2         3  
  2         17  
  2         439  
  2         4  
  2         15  
  2         1925  
  2         4  
  2         44  
  2         8926  
  2         5  
  2         73  
  2         8  
  2         4  
  2         94  
  2         11  
  2         3  
  2         118  
  2         12  
  2         3  
  2         331  
  2         18  
  2         27718  
  2         35  
  2         3323  
9              
10 2         24 our $VERSION = '0.0102'; # VERSION
11              
12 2         5 my @columns = qw/
13             1 fare_id
14             0 route_id
15             0 origin_id
16             0 destination_id
17             0 contains_id
18             /;
19              
20 2         8 for (my $i = 0; $i < $#columns; $i += 2) {
21 10         14266 my $required = $columns[$i];
22 10         15 my $column = $columns[$i + 1];
23              
24 10 100       41 has $column => (
25             is => 'ro',
26             isa => ($required ? Str : Maybe[Str]),
27             );
28             }
29             }
30              
31             1;
32              
33             __END__
34              
35             =pod
36              
37             =encoding utf-8
38              
39             =head1 NAME
40              
41             Opendata::GTFS::Type::FareRule - Fare rule
42              
43             =head1 VERSION
44              
45             Version 0.0102, released 2015-02-19.
46              
47              
48              
49             =head1 ATTRIBUTES
50              
51              
52             =head2 contains_id
53              
54             =begin HTML
55              
56             <table cellpadding="0" cellspacing="0">
57             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
58             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
59             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
60             </table>
61              
62             <p></p>
63              
64             =end HTML
65              
66             =head2 destination_id
67              
68             =begin HTML
69              
70             <table cellpadding="0" cellspacing="0">
71             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
72             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
73             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
74             </table>
75              
76             <p></p>
77              
78             =end HTML
79              
80             =head2 fare_id
81              
82             =begin HTML
83              
84             <table cellpadding="0" cellspacing="0">
85             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a>
86              
87             </td>
88             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
89             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
90             </table>
91              
92             <p></p>
93              
94             =end HTML
95              
96             =head2 origin_id
97              
98             =begin HTML
99              
100             <table cellpadding="0" cellspacing="0">
101             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
102             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
103             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
104             </table>
105              
106             <p></p>
107              
108             =end HTML
109              
110             =head2 route_id
111              
112             =begin HTML
113              
114             <table cellpadding="0" cellspacing="0">
115             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
116             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
117             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
118             </table>
119              
120             <p></p>
121              
122             =end HTML
123              
124             =head1 SOURCE
125              
126             L<https://github.com/Csson/p5-Opendata-GTFS-Feed>
127              
128             =head1 HOMEPAGE
129              
130             L<https://metacpan.org/release/Opendata-GTFS-Feed>
131              
132             =head1 AUTHOR
133              
134             Erik Carlsson <info@code301.com>
135              
136             =head1 COPYRIGHT AND LICENSE
137              
138             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
139              
140             This is free software; you can redistribute it and/or modify it under
141             the same terms as the Perl 5 programming language system itself.
142              
143             =cut