summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/getopt.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/getopt.pl')
-rw-r--r--Master/tlpkg/tlperl/lib/getopt.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/lib/getopt.pl b/Master/tlpkg/tlperl/lib/getopt.pl
index 343921f39cc..1d4008aaf60 100644
--- a/Master/tlpkg/tlperl/lib/getopt.pl
+++ b/Master/tlpkg/tlperl/lib/getopt.pl
@@ -1,3 +1,5 @@
+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";
+
;# $RCSfile: getopt.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:23:58 $
#
# This library is no longer being maintained, and is included for backward
@@ -22,11 +24,10 @@
sub Getopt {
local($argumentative) = @_;
local($_,$first,$rest);
- local($[) = 0;
while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
($first,$rest) = ($1,$2);
- if (index($argumentative,$first) >= $[) {
+ if (index($argumentative,$first) >= 0) {
if ($rest ne '') {
shift(@ARGV);
}