Daniel Friesel > Travel-Status-DE-DeutscheBahn > Travel::Status::DE::DeutscheBahn

Download:
Travel-Status-DE-DeutscheBahn-2.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 2.01   Source  

NAME ^

Travel::Status::DE::DeutscheBahn - Interface to the online arrival/departure monitor operated by Deutsche Bahn

SYNOPSIS ^

        use Travel::Status::DE::DeutscheBahn;

        my $status = Travel::Status::DE::DeutscheBahn->new(
                station => 'Essen Hbf',
        );

        if (my $err = $status->errstr) {
                die("Request error: ${err}\n");
        }

        for my $departure ($status->results) {
                printf(
                        "At %s: %s to %s from platform %s\n",
                        $departure->time,
                        $departure->line,
                        $departure->destination,
                        $departure->platform,
                );
        }

VERSION ^

version 2.01

DESCRIPTION ^

Travel::Status::DE::DeutscheBahn is an interface to the Deutsche Bahn departure monitor available at http://reiseauskunft.bahn.de/bin/bhftafel.exe/dn.

It takes a station name and (optional) date and time and reports all arrivals or departures at that station starting at the specified point in time (now if unspecified).

METHODS ^

my $status = Travel::Status::DE::DeutscheBahn->new(%opts)

Requests the departures/arrivals as specified by opts and returns a new Travel::Status::DE::HAFAS element with the results. Dies if the wrong opts were passed.

Calls Travel::Status::DE::HAFAS->new with service = DB. All opts are passed on. Please see Travel::Status::DE::HAFAS(3pm) for opts documentation and other methdos.

DIAGNOSTICS ^

None.

DEPENDENCIES ^

BUGS AND LIMITATIONS ^

Unknown.

SEE ALSO ^

Travel::Status::DE::HAFAS(3pm).

AUTHOR ^

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

LICENSE ^

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

syntax highlighting: