print usage if no arguments
[lab.git] / misc / httpbench.pl
index fc5a218..78191dd 100755 (executable)
@@ -4,11 +4,13 @@ use strict;
 use warnings;
 use utf8;
 
-use Getopt::Long;
+use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat);
 use Parallel::ForkManager;
 use LWP::Simple;
 use Time::HiRes qw(sleep);
 
+usage() if (@ARGV == 0);
+
 GetOptions(
     'h|help'            => \ my $help,
     'i|inputfile=s'     => \ my $file,