Date: Fri, 20 Sep 1996 12:38:14 +0200
From: Gisle Aas <aas@bergen.sn.no>
Subject: Symbol.pm clobbers $_ at startup
perl -le 'BEGIN {$_="foo";} use Symbol; print qualify($_)'
I don't understand why the module want to initialize %global from
<DATA> in the first place. Perhaps we want to apply this patch
instead.
Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST)
From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk>
Subject: Pod typos, pod2man bugs, and miscellaneous installation comments
Here is a patch for various typos and other defects in the Perl
5.003_05 pods, including the pods embedded in library modules.
But it doesn't do anything.
C<Symbol::qualify> turns unqualified symbol names into qualified
-variable names (e.g. "myvar" -> "MyPackage::myvar"). If it is given a
+variable names (e.g. "myvar" -E<gt> "MyPackage::myvar"). If it is given a
second parameter, C<qualify> uses it as the default package;
otherwise, it uses the package of its caller. Regardless, global
variable names (e.g. "STDOUT", "ENV", "SIG") are always qualfied with
my $genpkg = "Symbol::";
my $genseq = 0;
-my %global;
-while (<DATA>) {
- chomp;
- $global{$_} = 1;
-}
-close DATA;
+my %global = map {$_ => 1} qw(ARGV ARGVOUT ENV INC SIG STDERR STDIN STDOUT);
sub gensym () {
my $name = "GEN" . $genseq++;
}
1;
-
-__DATA__
-ARGV
-ARGVOUT
-ENV
-INC
-SIG
-STDERR
-STDIN
-STDOUT