Travel::Status::DE::EFA::Result - Information about a single departure received by Travel::Status::DE::EFA


    for my $departure ($status->results) {
            "At %s: %s to %s from platform %d\n",
            $departure->datetime->strftime('%H:%M'), $departure->line,
            $departure->destination, $departure->platform


version 2.02


Travel::Status::DE::EFA::Result describes a single departure as obtained by Travel::Status::DE::EFA. It contains information about the time, platform, line number and destination.




Time in minutes from now until the tram/bus/train will depart, including realtime data if available.

If delay information is available, it is already included.


DateTime(3pm) object for departure date and time. Realtime data if available, schedule data otherwise.


Expected delay from scheduled departure time in minutes. A delay of 0 indicates departure on time. undef when no realtime information is available.


Destination name.


Additional information related to the departure (string). If departures for an address were requested, this is the stop name, otherwise it may be recent news related to the line's schedule. If no information is available, returns an empty string.


1 if the departure got cancelled, 0 otherwise.


Unknown. Unlike the name may suggest, this is not a unique key / UUID for a departure: On the same day, different lines departing at the same station may have the same key. It might, however, be unique when combined with the line information.


The name/number of the line.


Travel::Status::DE::EFA::Line(3pm) object describing the departing line in detail.


Returns the "mode of transport" number. This is usually an integer between 0 and 11.


Returns the "mode of transport", for instance "zug", "s-bahn", "tram" or "sonstige".


Returns expected occupancy, if available, undef otherwise.

Occupancy values are passed from the backend as-is. Known values are "MANY_SEATS" (low occupation), "FEW_SEATS" (high occupation), "STANDING_ONLY" (very high occupation), and "FULL" (boarding not advised).


Departure platform number (may not be a number).


true if the platform number is operated by DB ("Gleis x"), false ("Bstg. x") otherwise.

Unfortunately, there is no distinction between tram and bus platforms yet, which may also have the same numbers.


List of up to three "interesting" stations served by this departure. Is a subset of route_post. Each station is a Travel::Status::DE::EFA::Stop(3pm) object.


List of stations the vehicle passed (or will have passed) before this stop. Each station is a Travel::Status::DE::EFA::Stop(3pm) object.


List of stations the vehicle will pass after this stop. Each station is a Travel::Status::DE::EFA::Stop(3pm) object.


DateTime(3pm) object holding the departure date and time according to realtime data. Undef if unknown / unavailable.


DateTime(3pm) object holding the scheduled departure date and time.


Train type, e.g. "ICE". Typically only defined for long-distance trains.


Train name, e.g. "ICE International" or "InterCityExpresS" or "Deichgraf". Typically only defined for long-distance trains.


Train number. Only defined if departure is a train.


Type of the departure. Note that sometimes puts bogus data in this field. See DEPARTURE TYPES.


$departure = Travel::Status::DE::EFA::Result->new(%data)

Returns a new Travel::Status::DE::EFA::Result object. You should not need to call this.


Allows the object data to be serialized to JSON.


The following are known so far:

* Abellio-Zug
* Bus
* Eurocity
* Intercity-Express
* NE (NachtExpress / night bus)
* Niederflurbus
* R-Bahn (RE / RegionalExpress)
* S-Bahn
* SB (Schnellbus)
* Straßenbahn
* U-Bahn






$result->type may contain bogus data. This comes from the interface.




Copyright (C) 2011-2023 by Birte Kristina Friesel <>


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