summaryrefslogtreecommitdiff
path: root/bin/hafas
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hafas')
-rwxr-xr-xbin/hafas21
1 files changed, 15 insertions, 6 deletions
diff --git a/bin/hafas b/bin/hafas
index 86cac23..543579a 100755
--- a/bin/hafas
+++ b/bin/hafas
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.014;
-our $VERSION = '0.06';
+our $VERSION = '0.08';
use utf8;
use DateTime;
@@ -273,7 +273,12 @@ sub format_delay {
sub show_message {
my ($msg) = @_;
- if ( $verbosity >= ( $min_verbosity{ $msg->type } // 0 ) ) {
+ if (
+ $msg->text
+ and ( not $msg->type
+ or $verbosity >= ( $min_verbosity{ $msg->type } // 0 ) )
+ )
+ {
if ( $msg->short ) {
printf( "| %s\n", $msg->short );
}
@@ -451,9 +456,13 @@ for my $res ( $hafas->connections ) {
printf("\n???\n");
}
for my $msg ( $sec->messages ) {
- if ( $msg->code eq 'text.connection.section.arrival.date.deviation'
- or $msg->code eq
- 'text.connection.section.departure.date.deviation' )
+ if (
+ $msg->code
+ and ( $msg->code eq
+ 'text.connection.section.arrival.date.deviation'
+ or $msg->code eq
+ 'text.connection.section.departure.date.deviation' )
+ )
{
next;
}
@@ -477,7 +486,7 @@ B<hafas> [B<-d> I<date>] [B<-t> I<time>] [B<-m> I<motlist>]
=head1 VERSION
-version 0.06
+version 0.08
=head1 DESCRIPTION