Travel::Status::DE::EFA - unofficial EFA departure monitor


    use Travel::Status::DE::EFA;

    my $status = Travel::Status::DE::EFA->new(
        efa_url => '',
        name => 'Essen Helenenstr'

    for my $d ($status->results) {
            "%s %-8s %-5s %s\n",
            $d->platform_name, $d->line, $d->destination


version 2.02


Travel::Status::DE::EFA is an unofficial interface to EFA-based departure monitors.

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


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

Requests the departures as specified by opts and returns a new Travel::Status::DE::EFA object. service and name are mandatory. Dies if the wrong opts were passed.


service => name

EFA service. See efa-m --list for known services. If you found a service not listed there, please notify <>.

place => place

Name of the place/city

type => address|poi|stop|stopID

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.

datetime => DateTime object

Request departures for the date/time specified by DateTime object. Default: now.

efa_encoding => encoding

Some EFA servers do not correctly specify their response encoding. If you observe encoding issues, you can manually specify it here. Example: iso-8859-15.

full_routes => 0|1

If true: Request full routes for all departures from the backend. This enables the route_pre, route_post and route_interesting accessors in Travel::Status::DE::EFA::Result(3pm).

proximity_search => 0|1

If true: Show departures for stops in the proximity of the requested place as well.

timeout => seconds

Request timeout, the argument is passed on to LWP::UserAgent(3pm). Default: 10 seconds. Set to 0 or a negative value to disable it.

my $status_p = Travel::Status::DE::EFA->new_p(%opt)

Returns a promise that resolves into a Travel::Status::DE::EFA instance ($status) on success and rejects with an error message on failure. In addition to the arguments of new, the following mandatory arguments must be set.

promise => promises module

Promises implementation to use for internal promises as well as new_p return value. Recommended: Mojo::Promise(3pm).

user_agent => user agent

User agent instance to use for asynchronous requests. The object must implement a post_p function. Recommended: Mojo::UserAgent(3pm).


In case of an HTTP request or EFA error, returns a string describing it. If none occured, returns undef.


Returns a list of the identified values for place and name. For instance, when requesting data for "E", "MartinSTR", identified_data will return ("Essen", "Martinstr.").


Returns a list of Travel::Status::DE::EFA::Line(3pm) objects, each one describing one line servicing the selected station.


Returns a list of name candidates if name is ambiguous. Returns nothing (undef / empty list) otherwise.


Returns a list of place candidates if place is ambiguous. Returns nothing (undef / empty list) otherwise.


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


Returns a list of known EFA entry points. Each list element is a hashref with the following elements.

url: service URL as passed to efa_url
name: Name of the entity operating this service
shortname: Short name of the entity
encoding: Server-side encoding override for efa_encoding (optional)


Returns a hashref describing the service $service, or undef if it is not known. See get_efa_urls for the hashref layout.




* Class::Accessor(3pm)
* DateTime(3pm)
* LWP::UserAgent(3pm)
* XML::LibXML(3pm)


Not all features of the web interface are supported.


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


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


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