line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Travel::Status::DE::URA::Stop; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
20
|
use strict; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
125
|
|
4
|
5
|
|
|
5
|
|
20
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
132
|
|
5
|
5
|
|
|
5
|
|
94
|
use 5.010; |
|
5
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
22
|
use parent 'Class::Accessor'; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
30
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '2.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Travel::Status::DE::URA::Stop->mk_ro_accessors(qw(datetime name)); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
10595
|
|
|
10595
|
1
|
533842
|
my ( $obj, %conf ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
10595
|
|
|
|
|
9638
|
my $ref = \%conf; |
17
|
|
|
|
|
|
|
|
18
|
10595
|
|
|
|
|
37785
|
return bless( $ref, $obj ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub date { |
22
|
3
|
|
|
3
|
1
|
4
|
my ($self) = @_; |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
8
|
return $self->{datetime}->strftime('%d.%m.%Y'); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub time { |
28
|
3
|
|
|
3
|
1
|
3
|
my ($self) = @_; |
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
|
|
13
|
return $self->{datetime}->strftime('%H:%M:%S'); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub TO_JSON { |
34
|
2
|
|
|
2
|
0
|
3
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
2
|
return { %{$self} }; |
|
2
|
|
|
|
|
13
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Travel::Status::DE::URA::Stop - Information about a stop |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
for my $stop ($departure->route_post) { |
50
|
|
|
|
|
|
|
printf( |
51
|
|
|
|
|
|
|
"%s %s\n", |
52
|
|
|
|
|
|
|
$stop->time, $stop->name |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 2.01 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Travel::Status::DE::URA::Stop describes a single stop of a departure's route. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 ACCESSORS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item $stop->datetime |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
DateTime object holding the arrival/departure date and time. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item $stop->date |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Arrival/departure date in dd.mm.YYYY format. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item $stop->time |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Arrival/departure time in HH:MM:SS format. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item $stop->name |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Stop name. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
None. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item Class::Accessor(3pm) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=back |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Unknown. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 SEE ALSO |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Travel::Status::DE::URA(3pm). |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 AUTHOR |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Copyright (C) 2015-2016 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 LICENSE |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This module is licensed under the same terms as Perl itself. |