diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-08 12:30:09 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-08 12:30:09 +0100 |
commit | fed04b3a641b8d82bd29fd9d8169053ffdfc8418 (patch) | |
tree | 2647061f7a7d34b3a1eda311e9810d16f00122a6 | |
parent | 2b0f4b4a60c7f70092b230256cc6376268864798 (diff) |
A little bit input validation
-rwxr-xr-x | bin/efa | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -39,6 +39,11 @@ GetOptions( 'debug' => \$debug, ); +unless (@to == 2 and @from == 2) { + print STDERR "Usage: efa --from <city> <stop> --to <city> <stop> [other options]\n"; + exit(1); +} + @post{'place_origin','name_origin'} = @from; @post{'place_destination','name_destination'} = @to; |