From b0a9181998ac10c950e3a1605c719cbb89545bd7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Sep 2015 01:20:30 +0200 Subject: hafas-m: fix -m help --- bin/hafas-m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/hafas-m b/bin/hafas-m index 931326a..97ecaa2 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -89,9 +89,12 @@ sub parse_mot_options { for my $type ( split( qr{,}, $types ) ) { if ( $type eq 'help' or $type eq 'list' or $type eq '?' ) { - my $desc = Travel::Status::DE::HAFAS::get_service($service); - if ($desc) { - my @mots = @{ $desc->{productbits} }; + if ( not $hafas_url ) { + $service //= 'DB'; + } + my %desc = Travel::Status::DE::HAFAS::get_service($service); + if (%desc) { + my @mots = @{ $desc{productbits} }; @mots = grep { $_ ne 'x' } @mots; @mots = uniq @mots; @mots = sort @mots; -- cgit v1.2.3