1 # $Id: newgetopt.pl,v 1.18 2001-09-21 15:34:59+02 jv Exp $
3 # This library is no longer being maintained, and is included for backward
4 # compatibility with Perl 4 programs which may require it.
5 # It is now just a wrapper around the Getopt::Long module.
7 # In particular, this should not be used as an example of modern Perl
8 # programming techniques.
10 # Suggested alternative: Getopt::Long
14 # Values for $order. See GNU getopt.c for details.
19 # Handle POSIX compliancy.
20 if ( defined $ENV{"POSIXLY_CORRECT"} ) {
21 $autoabbrev = 0; # no automatic abbrev of options (???)
22 $getopt_compat = 0; # disallow '+' to start options
23 $option_start = "(--|-)";
24 $order = $REQUIRE_ORDER;
29 $autoabbrev = 1; # automatic abbrev of options
30 $getopt_compat = 1; # allow '+' to start options
31 $option_start = "(--|-|\\+)";
37 # Other configurable settings.
38 $debug = 0; # for debugging
39 $ignorecase = 1; # ignore case when matching options
40 $argv_end = "--"; # don't change this!
45 ################ Subroutines ################
49 $Getopt::Long::debug = $newgetopt::debug
50 if defined $newgetopt::debug;
51 $Getopt::Long::autoabbrev = $newgetopt::autoabbrev
52 if defined $newgetopt::autoabbrev;
53 $Getopt::Long::getopt_compat = $newgetopt::getopt_compat
54 if defined $newgetopt::getopt_compat;
55 $Getopt::Long::option_start = $newgetopt::option_start
56 if defined $newgetopt::option_start;
57 $Getopt::Long::order = $newgetopt::order
58 if defined $newgetopt::order;
59 $Getopt::Long::bundling = $newgetopt::bundling
60 if defined $newgetopt::bundling;
61 $Getopt::Long::ignorecase = $newgetopt::ignorecase
62 if defined $newgetopt::ignorecase;
63 $Getopt::Long::ignorecase = $newgetopt::ignorecase
64 if defined $newgetopt::ignorecase;
65 $Getopt::Long::passthrough = $newgetopt::passthrough
66 if defined $newgetopt::passthrough;
71 ################ Package return ################
75 ################ End of newgetopt.pl ################