summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-10 17:36:37 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-10 17:36:37 +0000
commitb1fd7ccc41177ed6dd350c64b8373d34ce2d689e (patch)
treee49e2cac934cb1c79bee60e15b1c1f538d691e50 /lib
parent7d2f12589b9863889bcf889cdfff8a7528e4a1a7 (diff)
downloadperl-b1fd7ccc41177ed6dd350c64b8373d34ce2d689e.tar.gz
Remove a spurious undefined warning when using getopts.pl with -w.
(from Debian) p4raw-id: //depot/perl@24019
Diffstat (limited to 'lib')
-rw-r--r--lib/getopts.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getopts.pl b/lib/getopts.pl
index 4a50b8f6c2..e30820a318 100644
--- a/lib/getopts.pl
+++ b/lib/getopts.pl
@@ -31,7 +31,7 @@ sub Getopts {
}
eval "
push(\@opt_$first, \$rest);
- if(\$opt_$first eq '') {
+ if (!defined \$opt_$first or \$opt_$first eq '') {
\$opt_$first = \$rest;
}
else {