{ package newgetopt;
$REQUIRE_ORDER = 0;
$PERMUTE = 1;
$RETURN_IN_ORDER = 2;
if ( defined $ENV{"POSIXLY_CORRECT"} ) {
$autoabbrev = 0; $getopt_compat = 0; $option_start = "(--|-)";
$order = $REQUIRE_ORDER;
$bundling = 0;
$passthrough = 0;
}
else {
$autoabbrev = 1; $getopt_compat = 1; $option_start = "(--|-|\\+)";
$order = $PERMUTE;
$bundling = 0;
$passthrough = 0;
}
$debug = 0; $ignorecase = 1; $argv_end = "--"; }
use Getopt::Long;
sub NGetOpt {
$Getopt::Long::debug = $newgetopt::debug
if defined $newgetopt::debug;
$Getopt::Long::autoabbrev = $newgetopt::autoabbrev
if defined $newgetopt::autoabbrev;
$Getopt::Long::getopt_compat = $newgetopt::getopt_compat
if defined $newgetopt::getopt_compat;
$Getopt::Long::option_start = $newgetopt::option_start
if defined $newgetopt::option_start;
$Getopt::Long::order = $newgetopt::order
if defined $newgetopt::order;
$Getopt::Long::bundling = $newgetopt::bundling
if defined $newgetopt::bundling;
$Getopt::Long::ignorecase = $newgetopt::ignorecase
if defined $newgetopt::ignorecase;
$Getopt::Long::ignorecase = $newgetopt::ignorecase
if defined $newgetopt::ignorecase;
$Getopt::Long::passthrough = $newgetopt::passthrough
if defined $newgetopt::passthrough;
&GetOptions;
}
1;