Exit in case of unrecognized parameters.
authorFabian Keil <fk@fabiankeil.de>
Tue, 10 Nov 2009 16:21:06 +0000 (16:21 +0000)
committerFabian Keil <fk@fabiankeil.de>
Tue, 10 Nov 2009 16:21:06 +0000 (16:21 +0000)
tools/privoxy-log-parser.pl
tools/privoxy-regression-test.pl

index d32a838..076f020 100755 (executable)
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.58 2009/10/31 10:14:07 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.59 2009/11/10 16:19:38 fabiankeil Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -2268,7 +2268,7 @@ sub get_cli_options () {
         'statistics'               => \$cli_options{'statistics'},
         'version'                  => sub { VersionMessage && exit(0) },
         'help'                     => \&help,
-   );
+   ) or exit(1);
 }
 
 sub help () {
index 15e213d..8230835 100755 (executable)
@@ -7,7 +7,7 @@
 # A regression test "framework" for Privoxy. For documentation see:
 # perldoc privoxy-regression-test.pl
 #
-# $Id: privoxy-regression-test.pl,v 1.58 2009/10/29 16:46:42 fabiankeil Exp $
+# $Id: privoxy-regression-test.pl,v 1.59 2009/10/29 16:50:32 fabiankeil Exp $
 #
 # Wish list:
 #
@@ -1497,7 +1497,7 @@ sub parse_cli_options () {
         'test-number=s'      => \$cli_options{'test-number'},
         'verbose'            => \$cli_options{'verbose'},
         'version'            => sub {print_version && exit(0)}
-    );
+    ) or exit(1);
     $log_level |= $cli_options{'debug'};
 }