1 warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
3 # $Id: newgetopt.pl,v 1.18 2001/09/21 13:34:59 jv Exp $
5 # This library is no longer being maintained, and is included for backward
6 # compatibility with Perl 4 programs which may require it.
7 # It is now just a wrapper around the Getopt::Long module.
8 # This legacy library is deprecated and will be removed in a future
11 # In particular, this should not be used as an example of modern Perl
12 # programming techniques.
14 # Suggested alternative: Getopt::Long
18 # Values for $order. See GNU getopt.c for details.
23 # Handle POSIX compliancy.
24 if ( defined $ENV{"POSIXLY_CORRECT"} ) {
25 $autoabbrev = 0; # no automatic abbrev of options (???)
26 $getopt_compat = 0; # disallow '+' to start options
27 $option_start = "(--|-)";
28 $order = $REQUIRE_ORDER;
33 $autoabbrev = 1; # automatic abbrev of options
34 $getopt_compat = 1; # allow '+' to start options
35 $option_start = "(--|-|\\+)";
41 # Other configurable settings.
42 $debug = 0; # for debugging
43 $ignorecase = 1; # ignore case when matching options
44 $argv_end = "--"; # don't change this!
49 ################ Subroutines ################
53 $Getopt::Long::debug = $newgetopt::debug
54 if defined $newgetopt::debug;
55 $Getopt::Long::autoabbrev = $newgetopt::autoabbrev
56 if defined $newgetopt::autoabbrev;
57 $Getopt::Long::getopt_compat = $newgetopt::getopt_compat
58 if defined $newgetopt::getopt_compat;
59 $Getopt::Long::option_start = $newgetopt::option_start
60 if defined $newgetopt::option_start;
61 $Getopt::Long::order = $newgetopt::order
62 if defined $newgetopt::order;
63 $Getopt::Long::bundling = $newgetopt::bundling
64 if defined $newgetopt::bundling;
65 $Getopt::Long::ignorecase = $newgetopt::ignorecase
66 if defined $newgetopt::ignorecase;
67 $Getopt::Long::ignorecase = $newgetopt::ignorecase
68 if defined $newgetopt::ignorecase;
69 $Getopt::Long::passthrough = $newgetopt::passthrough
70 if defined $newgetopt::passthrough;
75 ################ Package return ################
79 ################ End of newgetopt.pl ################