summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-08-29 22:56:32 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-08-29 22:56:32 +0200
commitf0295359114d181fc063f269b3eb52d2221a97ec (patch)
tree023ca5e57392e336696391c9902bd31c780f8b20 /bin
parent49bca5b7fafffc9dc42660fc13c7931cd243426d (diff)
Fix efa --help
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/efa b/bin/efa
index 7cd3bbb..b55ffc3 100755
--- a/bin/efa
+++ b/bin/efa
@@ -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) {