File Coverage

blib/lib/Travel/Status/DE/VRR.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Travel::Status::DE::VRR;
2              
3 2     2   333421 use strict;
  2         3  
  2         67  
4 2     2   7 use warnings;
  2         2  
  2         91  
5 2     2   28 use 5.010;
  2         5  
6              
7             our $VERSION = '3.19';
8              
9 2     2   9 use parent 'Travel::Status::DE::EFA';
  2         9  
  2         18  
10              
11             sub new {
12 2     2 1 525238 my ( $class, %opt ) = @_;
13              
14 2         7 $opt{efa_url} = 'http://efa.vrr.de/vrr/XSLT_DM_REQUEST';
15              
16 2         23 return $class->SUPER::new(%opt);
17             }
18              
19             1;
20              
21             __END__
22              
23             =head1 NAME
24              
25             Travel::Status::DE::VRR - unofficial VRR departure monitor.
26              
27             =head1 SYNOPSIS
28              
29             use Travel::Status::DE::VRR;
30              
31             my $status = Travel::Status::DE::VRR->new(
32             place => 'Essen', name => 'Helenenstr'
33             );
34              
35             for my $d ($status->results) {
36             printf(
37             "%s %d %-5s %s\n",
38             $d->datetime->strftime('%H:%M'),
39             $d->platform, $d->line, $d->destination
40             );
41             }
42              
43              
44             =head1 VERSION
45              
46             version 3.19
47              
48             =head1 DESCRIPTION
49              
50             Travel::Status::DE::VRR is an unofficial interface to the VRR departure
51             monitor at
52             L<http://efa.vrr.de/vrr/XSLT_DM_REQUEST?language=de&itdLPxx_transpCompany=vrr&>.
53              
54             =head1 METHODS
55              
56             =over
57              
58             =item my $status = Travel::Status::DE::VRR->new(I<%opt>)
59              
60             Requests the departures as specified by I<opts> and returns a new
61             Travel::Status::DE::VRR object.
62              
63             Calls Travel::Status::DE::EFA->new with the appropriate B<efa_url>.
64             All I<opts> are passed on.
65              
66             See Travel::Status::DE::EFA(3pm) for the other parameters and methods.
67              
68             =back
69              
70             =head1 DIAGNOSTICS
71              
72             None.
73              
74             =head1 DEPENDENCIES
75              
76             =over
77              
78             =item * Class::Accessor(3pm)
79              
80             =item * DateTime(3pm)
81              
82             =item * LWP::UserAgent(3pm)
83              
84             =item * Travel::Status::DE::EFA(3pm)
85              
86             =back
87              
88             =head1 BUGS AND LIMITATIONS
89              
90             Many.
91              
92             =head1 SEE ALSO
93              
94             efa-m(1), Travel::Status::DE::EFA(3pm).
95              
96             =head1 AUTHOR
97              
98             Copyright (C) 2013-2023 Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt>
99              
100             =head1 LICENSE
101              
102             This module is licensed under the same terms as Perl itself.