diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-09 18:16:28 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-09 18:16:28 +0100 |
commit | f4b94cd6078dd909e67c87cc1912324074b8ecc2 (patch) | |
tree | 4c06d4bc6c431270bccf190d589df9775db4ed21 | |
parent | 1616bad43049e149df95014b7709026361b04c66 (diff) |
DB HAFAS is no more; service is now a mandatory argument
-rwxr-xr-x | bin/hafas | 12 | ||||
-rw-r--r-- | lib/Travel/Routing/DE/HAFAS.pm | 6 |
2 files changed, 15 insertions, 3 deletions
@@ -81,6 +81,18 @@ if ($list_services) { exit 0; } +if ( not $service ) { + say STDERR 'Note: You have called hafas without specifying a service.'; + say STDERR q{}; + say STDERR 'Unfortunately, the previous default service (DB HAFAS)'; + say STDERR 'is no more, and there is no generic replacement available.'; + say STDERR q{}; + say STDERR 'Please use "hafas --list" to list supported services,'; + say STDERR 'and then select one via -s <service>.'; + say STDERR 'Falling back to ÖBB for now.'; + $service = 'ÖBB'; +} + parse_mot_options(); my ( $from_stop, @via_stops ) = @ARGV; diff --git a/lib/Travel/Routing/DE/HAFAS.pm b/lib/Travel/Routing/DE/HAFAS.pm index 1498c48..a53893f 100644 --- a/lib/Travel/Routing/DE/HAFAS.pm +++ b/lib/Travel/Routing/DE/HAFAS.pm @@ -46,7 +46,7 @@ sub new { } if ( not defined $service ) { - $service = $conf{service} = 'DB'; + confess("The service option is mandatory"); } if ( defined $service and not exists $hafas_instance{$service} ) { @@ -639,9 +639,9 @@ Request connections with scheduled changeover durations of at least I<minutes>. Note that this does not account for real-time data: the backend may return delayed connections that violate the specified changeover duration. -=item B<service> => I<service> +=item B<service> => I<service> (mandatory) -Request results from I<service>, defaults to "DB". +Request results from I<service>. See B<get_services> (and C<< hafas-m --list >>) for a list of supported services. |