File Coverage

blib/lib/Opendata/GTFS/Type/Stop.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   10 use Opendata::GTFS::Standard;
  2         3  
  2         16  
2 2     2   2652 use strict;
  2         3  
  2         51  
3 2     2   8 use warnings;
  2         3  
  2         73  
4              
5             # PODNAME: Opendata::GTFS::Type::Stop
6             # ABSTRACT: Stop
7              
8 2     2   3177 class Opendata::GTFS::Type::Stop using Moose {
  2     2   44  
  2     2   11  
  2         2  
  2         126  
  2         9  
  2         30  
  2         21  
  2         577  
  2         3  
  2         17  
  2         114  
  2         3  
  2         94  
  2         10  
  2         15  
  2         205  
  2         60  
  2         10  
  2         3  
  2         14  
  2         6430  
  2         5  
  2         18  
  2         10287  
  2         4  
  2         15  
  2         6759  
  2         4  
  2         20  
  2         150  
  2         3  
  2         17  
  2         426  
  2         2  
  2         16  
  2         1993  
  2         5  
  2         13  
  2         8873  
  2         6  
  2         121  
  2         9  
  2         3  
  2         65  
  2         9  
  2         3  
  2         113  
  2         12  
  2         2  
  2         324  
  2         17  
  2         28994  
  2         32  
  2         3465  
9              
10 2         25 our $VERSION = '0.0104'; # VERSION
11              
12 2         7 my @columns = qw/
13             1 stop_id
14             0 stop_code
15             1 stop_name
16             0 stop_desc
17             1 stop_lat
18             1 stop_lon
19             0 zone_id
20             0 stop_url
21             0 location_type
22             0 parent_station
23             0 stop_timezone
24             0 wheelchair_boarding
25             /;
26              
27 2         9 for (my $i = 0; $i < $#columns; $i += 2) {
28 24         40026 my $required = $columns[$i];
29 24         37 my $column = $columns[$i + 1];
30              
31 24 100       85 has $column => (
32             is => 'ro',
33             isa => ($required ? Str : Maybe[Str]),
34             );
35             }
36             }
37              
38             1;
39              
40             __END__
41              
42             =pod
43              
44             =encoding utf-8
45              
46             =head1 NAME
47              
48             Opendata::GTFS::Type::Stop - Stop
49              
50             =head1 VERSION
51              
52             Version 0.0104, released 2015-02-22.
53              
54              
55              
56             =head1 ATTRIBUTES
57              
58              
59             =head2 location_type
60              
61             =begin HTML
62              
63             <table cellpadding="0" cellspacing="0">
64             <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>
65             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
66             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
67             </table>
68              
69             <p></p>
70              
71             =end HTML
72              
73             =head2 parent_station
74              
75             =begin HTML
76              
77             <table cellpadding="0" cellspacing="0">
78             <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>
79             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
80             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
81             </table>
82              
83             <p></p>
84              
85             =end HTML
86              
87             =head2 stop_code
88              
89             =begin HTML
90              
91             <table cellpadding="0" cellspacing="0">
92             <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>
93             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
94             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
95             </table>
96              
97             <p></p>
98              
99             =end HTML
100              
101             =head2 stop_desc
102              
103             =begin HTML
104              
105             <table cellpadding="0" cellspacing="0">
106             <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>
107             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
108             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
109             </table>
110              
111             <p></p>
112              
113             =end HTML
114              
115             =head2 stop_id
116              
117             =begin HTML
118              
119             <table cellpadding="0" cellspacing="0">
120             <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>
121              
122             </td>
123             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
124             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
125             </table>
126              
127             <p></p>
128              
129             =end HTML
130              
131             =head2 stop_lat
132              
133             =begin HTML
134              
135             <table cellpadding="0" cellspacing="0">
136             <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>
137              
138             </td>
139             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
140             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
141             </table>
142              
143             <p></p>
144              
145             =end HTML
146              
147             =head2 stop_lon
148              
149             =begin HTML
150              
151             <table cellpadding="0" cellspacing="0">
152             <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>
153              
154             </td>
155             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
156             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
157             </table>
158              
159             <p></p>
160              
161             =end HTML
162              
163             =head2 stop_name
164              
165             =begin HTML
166              
167             <table cellpadding="0" cellspacing="0">
168             <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>
169              
170             </td>
171             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
172             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
173             </table>
174              
175             <p></p>
176              
177             =end HTML
178              
179             =head2 stop_timezone
180              
181             =begin HTML
182              
183             <table cellpadding="0" cellspacing="0">
184             <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>
185             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
186             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
187             </table>
188              
189             <p></p>
190              
191             =end HTML
192              
193             =head2 stop_url
194              
195             =begin HTML
196              
197             <table cellpadding="0" cellspacing="0">
198             <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>
199             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
200             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
201             </table>
202              
203             <p></p>
204              
205             =end HTML
206              
207             =head2 wheelchair_boarding
208              
209             =begin HTML
210              
211             <table cellpadding="0" cellspacing="0">
212             <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>
213             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
214             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
215             </table>
216              
217             <p></p>
218              
219             =end HTML
220              
221             =head2 zone_id
222              
223             =begin HTML
224              
225             <table cellpadding="0" cellspacing="0">
226             <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>
227             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
228             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
229             </table>
230              
231             <p></p>
232              
233             =end HTML
234              
235             =head1 SOURCE
236              
237             L<https://github.com/Csson/p5-Opendata-GTFS-Feed>
238              
239             =head1 HOMEPAGE
240              
241             L<https://metacpan.org/release/Opendata-GTFS-Feed>
242              
243             =head1 AUTHOR
244              
245             Erik Carlsson <info@code301.com>
246              
247             =head1 COPYRIGHT AND LICENSE
248              
249             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
250              
251             This is free software; you can redistribute it and/or modify it under
252             the same terms as the Perl 5 programming language system itself.
253              
254             =cut