From fed04b3a641b8d82bd29fd9d8169053ffdfc8418 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 8 Mar 2009 12:30:09 +0100 Subject: A little bit input validation --- bin/efa | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/efa b/bin/efa index d9bc5ed..51e7c8a 100755 --- a/bin/efa +++ b/bin/efa @@ -39,6 +39,11 @@ GetOptions( 'debug' => \$debug, ); +unless (@to == 2 and @from == 2) { + print STDERR "Usage: efa --from --to [other options]\n"; + exit(1); +} + @post{'place_origin','name_origin'} = @from; @post{'place_destination','name_destination'} = @to; -- cgit v1.2.3