diff options
author | John L. Allen <allen@gateway.grumman.com> | 1997-09-05 00:00:00 +0000 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-09-05 00:00:00 +0000 |
commit | 29d4204f776e15312c0c98f12e65eab4d319cddc (patch) | |
tree | 66258556eae32553c8d8e91362cb83db1fc1a6d9 /lib/Getopt | |
parent | d3308daf9dca01364c4abacd44066e73a758e9a5 (diff) | |
download | perl-29d4204f776e15312c0c98f12e65eab4d319cddc.tar.gz |
Banishing eval from getopt.pl and Getopt/Std.pm
This is a minimal patch *adding no new features*.
I submitted a prior patch that reworded the pods and allowed -- to
terminate args, among other things, but it never made it
in. Perhaps this will.
p5p-msgid: Pine.SOL.3.91.970920154720.3683A@gateway
Diffstat (limited to 'lib/Getopt')
-rw-r--r-- | lib/Getopt/Std.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Getopt/Std.pm b/lib/Getopt/Std.pm index fee0d33e8f..27882935f9 100644 --- a/lib/Getopt/Std.pm +++ b/lib/Getopt/Std.pm @@ -67,7 +67,7 @@ sub getopt ($;$) { $$hash{$first} = $rest; } else { - eval "\$opt_$first = \$rest;"; + ${"opt_$first"} = $rest; push( @EXPORT, "\$opt_$first" ); } } @@ -76,7 +76,7 @@ sub getopt ($;$) { $$hash{$first} = 1; } else { - eval "\$opt_$first = 1;"; + ${"opt_$first"} = 1; push( @EXPORT, "\$opt_$first" ); } if ($rest ne '') { @@ -116,7 +116,7 @@ sub getopts ($;$) { $$hash{$first} = $rest; } else { - eval "\$opt_$first = \$rest;"; + ${"opt_$first"} = $rest; push( @EXPORT, "\$opt_$first" ); } } @@ -125,7 +125,7 @@ sub getopts ($;$) { $$hash{$first} = 1; } else { - eval "\$opt_$first = 1"; + ${"opt_$first"} = 1; push( @EXPORT, "\$opt_$first" ); } if($rest eq '') { |