diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-29 22:56:32 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-29 22:56:32 +0200 |
commit | f0295359114d181fc063f269b3eb52d2221a97ec (patch) | |
tree | 023ca5e57392e336696391c9902bd31c780f8b20 | |
parent | 49bca5b7fafffc9dc42660fc13c7931cd243426d (diff) |
Fix efa --help
-rwxr-xr-x | bin/efa | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -16,9 +16,11 @@ my ($test_dump, $test_parse); my $efa; my (@from, @to, @via, $from_type, $to_type, $via_type); my $opt = { + 'help' => sub { exec('perldoc', '-F', $0) }, 'ignore-info' => \$ignore_info, 'from' => \@from, 'to' => \@to, + 'version' => sub { say "efa version $VERSION"; exit 0 }, 'via' => \@via, }; @@ -49,12 +51,7 @@ GetOptions( via=s@{2} walk-speed|w=s }, -) or die("Please see $0 --help\n"); - -if ($opt->{'version'}) { - say "efa version $VERSION"; - exit 0; -} +) or die("Please see perldoc -F $0\n"); if (not (@from and @to)) { if (@ARGV == 4) { |