summaryrefslogtreecommitdiff
path: root/bin/efa-m
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-09 17:33:21 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-09 17:33:21 +0200
commitcddc688b8152407f53916268a41304c01d137e87 (patch)
tree2062bb4e3b505361023f1a7473edd851017f170d /bin/efa-m
parent17608f3e323309cb4ca8919be73e785ebcf0bec5 (diff)
Code cleanup
Diffstat (limited to 'bin/efa-m')
-rwxr-xr-xbin/efa-m30
1 files changed, 11 insertions, 19 deletions
diff --git a/bin/efa-m b/bin/efa-m
index ab9035c..a722588 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -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);