diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-09-09 17:33:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-09-09 17:33:21 +0200 |
commit | cddc688b8152407f53916268a41304c01d137e87 (patch) | |
tree | 2062bb4e3b505361023f1a7473edd851017f170d /bin | |
parent | 17608f3e323309cb4ca8919be73e785ebcf0bec5 (diff) |
Code cleanup
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/efa-m | 30 |
1 files changed, 11 insertions, 19 deletions
@@ -15,24 +15,24 @@ my @output; binmode( STDOUT, ':encoding(utf-8)' ); GetOptions( - 'd|date=s' => \$date, - 'h|help' => sub { show_help(0) }, - 't|time=s' => \$time, - 'V|version' => \&show_version, + 'd|date=s' => \$date, + 'h|help' => sub { show_help(0) }, + 't|time=s' => \$time, + 'V|version' => \&show_version, ) or show_help(1); -if (@ARGV != 2) { +if ( @ARGV != 2 ) { show_help(1); } -my ($place, $station) = @ARGV; +my ( $place, $station ) = @ARGV; my $status = Travel::Status::DE::VRR->new( - date => $date, - place => $place, - name => $station, - time => $time, + date => $date, + place => $place, + name => $station, + time => $time, ); sub show_help { @@ -75,15 +75,7 @@ sub display_result { for my $d ( $status->results ) { - push( - @output, - [ - $d->time, - $d->platform, - $d->line, - $d->destination, - ] - ); + push( @output, [ $d->time, $d->platform, $d->line, $d->destination, ] ); } display_result(@output); |