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         14  
2 2     2   2553 use strict;
  2         4  
  2         67  
3 2     2   9 use warnings;
  2         2  
  2         75  
4              
5             # PODNAME: Opendata::GTFS::Type::FareRule
6             # ABSTRACT: Fare rule
7              
8 2     2   2970 class Opendata::GTFS::Type::FareRule using Moose {
  2     2   51  
  2     2   10  
  2         2  
  2         117  
  2         9  
  2         3  
  2         23  
  2         485  
  2         3  
  2         12  
  2         153  
  2         3  
  2         113  
  2         9  
  2         4  
  2         158  
  2         83  
  2         11  
  2         4  
  2         15  
  2         6088  
  2         139  
  2         12  
  2         10028  
  2         3  
  2         14  
  2         6091  
  2         4  
  2         17  
  2         158  
  2         4  
  2         17  
  2         363  
  2         3  
  2         13  
  2         1867  
  2         4  
  2         12  
  2         8762  
  2         5  
  2         88  
  2         9  
  2         2  
  2         52  
  2         7  
  2         3  
  2         99  
  2         11  
  2         4  
  2         254  
  2         14  
  2         26837  
  2         30  
  2         3286  
9              
10 2         22 our $VERSION = '0.0104'; # VERSION
11              
12 2         4 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         14054 my $required = $columns[$i];
22 10         11 my $column = $columns[$i + 1];
23              
24 10 100       31 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.0104, released 2015-02-22.
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