NAME

Travel::Status::DE::VRR - inofficial VRR departure monitor

SYNOPSIS

use Travel::Status::DE::VRR;

my $status = Travel::Status::DE::VRR->new(
    place => 'Essen', name => 'Helenenstr'
);

for my $d ($status->results) {
    printf(
        "%s %-8s %-5s %s\n",
        $d->time, $d->platform, $d->line, $d->destination
    );
}

VERSION

version 0.02

DESCRIPTION

Travel::Status::DE::VRR is an inofficial interface to the VRR departure monitor available at http://efa.vrr.de/vrr/XSLT_DM_REQUEST?language=de&itdLPxx_transpCompany=vrr&.

It reports all upcoming tram/bus/train departures at a given place.

METHODS

my $status = Travel::Status::DE::VRR->new(%opt)

Requests the departures as specified by opts and returns a new Travel::Status::DE::VRR object. Dies if the wrong opts were passed.

Arguments:

place => place

Name of the place/city

type => address|poi|stop

Type of the following name. poi means "point of interest". Defaults to stop (stop/station name).

name => name

address / poi / stop name to list departures for.

$status->errstr

In case of an error in the HTTP requests, returns a string describing it. If no error occured, returns undef.

$status->results

Returns a list of Travel::Status::DE::VRR::Result(3pm) objects, each one describing one departure.

DIAGNOSTICS

None.

DEPENDENCIES

  • Class::Accessor(3pm)

  • WWW::Mechanize(3pm)

  • XML::LibXML(3pm)

BUGS AND LIMITATIONS

Not all features of the web interface are supported.

SEE ALSO

efa-m(1), Travel::Status::DE::VRR::Result(3pm).

AUTHOR

Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>

LICENSE

This module is licensed under the same terms as Perl itself.