File Coverage

blib/lib/Opendata/GTFS/Type/Agency.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         2  
  2         17  
2 2     2   2797 use strict;
  2         2  
  2         54  
3 2     2   7 use warnings;
  2         3  
  2         66  
4              
5             # PODNAME: Opendata::GTFS::Type::Agency
6             # ABSTRACT: Agency
7              
8 2     2   27948 class Opendata::GTFS::Type::Agency using Moose {
  2     2   50  
  2     2   16  
  2         3  
  2         112  
  2         8  
  2         3  
  2         19  
  2         595  
  2         3  
  2         13  
  2         112  
  2         3  
  2         153  
  2         10  
  2         3  
  2         163  
  2         49  
  2         9  
  2         3  
  2         17  
  2         6356  
  2         4  
  2         15  
  2         12604  
  2         162056  
  2         13  
  2         30150  
  2         4  
  2         22  
  2         1644  
  2         16685  
  2         27  
  2         1809  
  2         5654  
  2         32  
  2         2297  
  2         5  
  2         24  
  2         113393  
  2         11  
  2         69  
  2         9  
  2         3  
  2         62  
  2         10  
  2         2  
  2         68  
  2         7  
  2         3  
  2         327  
  2         17  
  2         41530  
  2         42  
  2         3506  
9              
10 2         117 our $VERSION = '0.0103'; # VERSION:
11              
12 2         13 my @columns = qw/
13             0 agency_id
14             1 agency_name
15             1 agency_url
16             1 agency_timezone
17             0 agency_lang
18             0 agency_phone
19             0 agency_fare_url
20             /;
21              
22 2         23 for (my $i = 0; $i < $#columns; $i += 2) {
23 14         23186 my $required = $columns[$i];
24 14         22 my $column = $columns[$i + 1];
25              
26 14 100       59 has $column => (
27             is => 'ro',
28             isa => ($required ? Str : Maybe[Str]),
29             );
30             }
31             }
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding utf-8
40              
41             =head1 NAME
42              
43             Opendata::GTFS::Type::Agency - Agency
44              
45             =head1 VERSION
46              
47             Version 0.0103, released 2015-02-21.
48              
49              
50              
51             =head1 ATTRIBUTES
52              
53              
54             =head2 agency_fare_url
55              
56             =begin HTML
57              
58             <table cellpadding="0" cellspacing="0">
59             <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>
60             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
61             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
62             </table>
63              
64             <p></p>
65              
66             =end HTML
67              
68             =head2 agency_id
69              
70             =begin HTML
71              
72             <table cellpadding="0" cellspacing="0">
73             <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>
74             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
75             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
76             </table>
77              
78             <p></p>
79              
80             =end HTML
81              
82             =head2 agency_lang
83              
84             =begin HTML
85              
86             <table cellpadding="0" cellspacing="0">
87             <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>
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 agency_name
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#Str">Str</a>
102              
103             </td>
104             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
105             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
106             </table>
107              
108             <p></p>
109              
110             =end HTML
111              
112             =head2 agency_phone
113              
114             =begin HTML
115              
116             <table cellpadding="0" cellspacing="0">
117             <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>
118             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
119             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
120             </table>
121              
122             <p></p>
123              
124             =end HTML
125              
126             =head2 agency_timezone
127              
128             =begin HTML
129              
130             <table cellpadding="0" cellspacing="0">
131             <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>
132              
133             </td>
134             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
135             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
136             </table>
137              
138             <p></p>
139              
140             =end HTML
141              
142             =head2 agency_url
143              
144             =begin HTML
145              
146             <table cellpadding="0" cellspacing="0">
147             <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>
148              
149             </td>
150             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
151             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
152             </table>
153              
154             <p></p>
155              
156             =end HTML
157              
158             =head1 SOURCE
159              
160             L<https://github.com/Csson/p5-Opendata-GTFS-Feed>
161              
162             =head1 HOMEPAGE
163              
164             L<https://metacpan.org/release/Opendata-GTFS-Feed>
165              
166             =head1 AUTHOR
167              
168             Erik Carlsson <info@code301.com>
169              
170             =head1 COPYRIGHT AND LICENSE
171              
172             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
173              
174             This is free software; you can redistribute it and/or modify it under
175             the same terms as the Perl 5 programming language system itself.
176              
177             =cut