diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hafas-m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/hafas-m b/bin/hafas-m index c40f0ab..8eca084 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -149,14 +149,14 @@ sub display_result { my $d = $line->[6]; my $first_message = 1; for my $msg ( $d->messages ) { - if ( $msg->{ref_count} == 1 ) { + if ( $msg->ref_count == 1 ) { if ($first_message) { print "\n"; $first_message = 0; } - printf( "# %s\n", $msg->{header} ); - if ( $msg->{lead} ) { - printf( "# %s\n", $msg->{lead} ); + printf( "# %s\n", $msg->header ); + if ( $msg->lead ) { + printf( "# %s\n", $msg->lead ); } } } @@ -184,9 +184,9 @@ if ( my $err = $status->errstr ) { my $message_id = 1; for my $m ( $status->messages ) { - if ( $m->{ref_count} > 1 ) { + if ( $m->ref_count > 1 ) { $m->{id} = $message_id++; - printf( "# (%d) %s\n# %s\n\n", $m->{id}, $m->{header}, $m->{lead} ); + printf( "# (%d) %s\n# %s\n\n", $m->{id}, $m->header, $m->lead ); } } @@ -199,7 +199,7 @@ for my $d ( $status->results ) { my $info_line = $d->info // q{}; for my $message ( $d->messages ) { - if ( $message->{ref_count} > 1 ) { + if ( $message->ref_count > 1 ) { $info_line = sprintf( '(%d) %s', $message->{id}, $info_line ); } } |