From f0295359114d181fc063f269b3eb52d2221a97ec Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 29 Aug 2010 22:56:32 +0200 Subject: Fix efa --help --- bin/efa | 9 +++------ 1 file 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) { -- cgit v1.2.3