summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-12-11 00:25:45 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-12-11 00:25:45 +0100
commit760fdc53ac4ba5e34b0ea6fe659dc81b462adfd1 (patch)
tree2477a7130491984569f6b4bc0c291fc35ef155b9 /bin
parentcfe2fae34e3bfe545a7576918aed0556e468a54c (diff)
perltidy
Diffstat (limited to 'bin')
-rwxr-xr-xbin/aseag-m29
1 files changed, 11 insertions, 18 deletions
diff --git a/bin/aseag-m b/bin/aseag-m
index f4ca96b..6361312 100755
--- a/bin/aseag-m
+++ b/bin/aseag-m
@@ -13,12 +13,12 @@ use Getopt::Long qw(:config no_ignore_case);
use List::Util qw(max);
use Travel::Status::DE::ASEAG;
-my ( @grep_lines );
+my (@grep_lines);
GetOptions(
- 'h|help' => sub { show_help(0) },
- 'l|line=s@' => \@grep_lines,
- 'V|version' => \&show_version,
+ 'h|help' => sub { show_help(0) },
+ 'l|line=s@' => \@grep_lines,
+ 'V|version' => \&show_version,
) or show_help(1);
@@ -27,19 +27,16 @@ if ( @ARGV != 1 ) {
}
# --line=foo,bar support
-@grep_lines = split( qr{,}, join( q{,}, @grep_lines ) );
+@grep_lines = split( qr{,}, join( q{,}, @grep_lines ) );
-my ( $stop_name ) = @ARGV;
+my ($stop_name) = @ARGV;
-my $status = Travel::Status::DE::ASEAG->new(
- name => $stop_name,
-);
+my $status = Travel::Status::DE::ASEAG->new( name => $stop_name, );
sub show_help {
my ($code) = @_;
- print "Usage: aseag-m <stop name>\n"
- . "See also: man aseag-m\n";
+ print "Usage: aseag-m <stop name>\n" . "See also: man aseag-m\n";
exit $code;
}
@@ -79,17 +76,13 @@ sub show_results {
for my $d ( $status->results ) {
- my $dtime = $d->time;
+ my $dtime = $d->time;
- if (
- ( @grep_lines and not( $d->line ~~ \@grep_lines ) )
- )
- {
+ if ( ( @grep_lines and not( $d->line ~~ \@grep_lines ) ) ) {
next;
}
- push( @output,
- [ $dtime, $d->line, $d->destination ] );
+ push( @output, [ $dtime, $d->line, $d->destination ] );
}
display_result(@output);