summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-08 12:30:09 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-08 12:30:09 +0100
commitfed04b3a641b8d82bd29fd9d8169053ffdfc8418 (patch)
tree2647061f7a7d34b3a1eda311e9810d16f00122a6
parent2b0f4b4a60c7f70092b230256cc6376268864798 (diff)
A little bit input validation
-rwxr-xr-xbin/efa5
1 files changed, 5 insertions, 0 deletions
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 <city> <stop> --to <city> <stop> [other options]\n";
+ exit(1);
+}
+
@post{'place_origin','name_origin'} = @from;
@post{'place_destination','name_destination'} = @to;