/usr/share/perl/5.14.2/newgetopt.pl is in perl-modules 5.14.2-6ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install the separate libperl4-corelibs-perl package. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
# This library is no longer being maintained, and is included for backward
# compatibility with Perl 4 programs which may require it.
# It is now just a wrapper around the Getopt::Long module.
# This legacy library is deprecated and will be removed in a future
# release of perl.
#
# In particular, this should not be used as an example of modern Perl
# programming techniques.
#
# Suggested alternative: Getopt::Long
{ package newgetopt;
# Values for $order. See GNU getopt.c for details.
$REQUIRE_ORDER = 0;
$PERMUTE = 1;
$RETURN_IN_ORDER = 2;
# Handle POSIX compliance.
if ( defined $ENV{"POSIXLY_CORRECT"} ) {
$autoabbrev = 0; # no automatic abbrev of options (???)
$getopt_compat = 0; # disallow '+' to start options
$option_start = "(--|-)";
$order = $REQUIRE_ORDER;
$bundling = 0;
$passthrough = 0;
}
else {
$autoabbrev = 1; # automatic abbrev of options
$getopt_compat = 1; # allow '+' to start options
$option_start = "(--|-|\\+)";
$order = $PERMUTE;
$bundling = 0;
$passthrough = 0;
}
# Other configurable settings.
$debug = 0; # for debugging
$ignorecase = 1; # ignore case when matching options
$argv_end = "--"; # don't change this!
}
use Getopt::Long;
################ Subroutines ################
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;
}
################ Package return ################
1;
################ End of newgetopt.pl ################
|