summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-09-22 14:03:17 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-09-22 14:03:17 (EDT)
commit37fc33abf5130de76800e3cba2fb60cf74c5c239 (patch)
tree9121aab0c6369cae9bc44b5665542d8992cf4477
parent54231a8541deca709baeb49e35e62a4d7ecea00a (diff)
downloadssic-37fc33abf5130de76800e3cba2fb60cf74c5c239.zip
ssic-37fc33abf5130de76800e3cba2fb60cf74c5c239.tar.gz
ssic-37fc33abf5130de76800e3cba2fb60cf74c5c239.tar.bz2
Convert to Getopt::Long.
-rw-r--r--src/ssic.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ssic.pl b/src/ssic.pl
index 30f1f25..cad6851 100644
--- a/src/ssic.pl
+++ b/src/ssic.pl
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Getopt::Std;
+use Getopt::Long;
use CGI::SSI;
sub main
@@ -14,7 +14,13 @@ sub main
$SIG{'__WARN__'} = \&warning;
- if (not getopts('o:hV', \%opts)) {
+ Getopt::Long::Configure("no_ignore_case", "bundling", "gnu_compat",
+ "no_getopt_compat");
+ if (not GetOptions(\%opts,
+ "o=s",
+ "h|help",
+ "V|version",
+ )) {
usage(*STDERR);
}
@@ -57,9 +63,9 @@ sub help
usage($fh);
print("Options:\n");
- print(" -o <output> Place the output into <output>\n");
- print(" -h Display this information\n");
- print(" -V Display compiler version information\n");
+ print(" -o <output> Place the output into <output>\n");
+ print(" -h, --help Display this information\n");
+ print(" -V, --version Display compiler version information\n");
}
sub version