File Coverage

blib/lib/Opendata/GTFS/Type/Shape.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         15  
2 2     2   2480 use strict;
  2         3  
  2         58  
3 2     2   8 use warnings;
  2         4  
  2         63  
4              
5             # PODNAME: Opendata::GTFS::Type::Shape
6             # ABSTRACT: Shape:
7              
8 2     2   2911 class Opendata::GTFS::Type::Shape using Moose {
  2     2   45  
  2     2   9  
  2         4  
  2         113  
  2         8  
  2         2  
  2         18  
  2         483  
  2         3  
  2         13  
  2         105  
  2         3  
  2         89  
  2         8  
  2         3  
  2         156  
  2         50  
  2         9  
  2         3  
  2         12  
  2         5871  
  2         3  
  2         15  
  2         9948  
  2         3  
  2         17  
  2         6141  
  2         3  
  2         25  
  2         141  
  2         3  
  2         18  
  2         393  
  2         4  
  2         14  
  2         2161  
  2         2  
  2         14  
  2         9367  
  2         7  
  2         90  
  2         9  
  2         3  
  2         88  
  2         19  
  2         3  
  2         122  
  2         11  
  2         2  
  2         284  
  2         19  
  2         27375  
  2         34  
  2         3617  
9              
10 2         27 our $VERSION = '0.0102'; # VERSION
11              
12 2         6 my @columns = qw/
13             1 shape_id
14             1 shape_pt_lat
15             1 shape_pt_lon
16             1 shape_pt_sequence
17             0 shape_dist_traveled
18             /;
19              
20 2         7 for (my $i = 0; $i < $#columns; $i += 2) {
21 10         14078 my $required = $columns[$i];
22 10         14 my $column = $columns[$i + 1];
23              
24 10 100       40 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::Shape - Shape:
42              
43             =head1 VERSION
44              
45             Version 0.0102, released 2015-02-19.
46              
47              
48              
49             =head1 ATTRIBUTES
50              
51              
52             =head2 shape_dist_traveled
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 shape_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#Str">Str</a>
72              
73             </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 shape_pt_lat
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#Str">Str</a>
88              
89             </td>
90             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
91             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
92             </table>
93              
94             <p></p>
95              
96             =end HTML
97              
98             =head2 shape_pt_lon
99              
100             =begin HTML
101              
102             <table cellpadding="0" cellspacing="0">
103             <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>
104              
105             </td>
106             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
107             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
108             </table>
109              
110             <p></p>
111              
112             =end HTML
113              
114             =head2 shape_pt_sequence
115              
116             =begin HTML
117              
118             <table cellpadding="0" cellspacing="0">
119             <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>
120              
121             </td>
122             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
123             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
124             </table>
125              
126             <p></p>
127              
128             =end HTML
129              
130             =head1 SOURCE
131              
132             L<https://github.com/Csson/p5-Opendata-GTFS-Feed>
133              
134             =head1 HOMEPAGE
135              
136             L<https://metacpan.org/release/Opendata-GTFS-Feed>
137              
138             =head1 AUTHOR
139              
140             Erik Carlsson <info@code301.com>
141              
142             =head1 COPYRIGHT AND LICENSE
143              
144             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
145              
146             This is free software; you can redistribute it and/or modify it under
147             the same terms as the Perl 5 programming language system itself.
148              
149             =cut