From: Perl 5 Porters Date: Fri, 20 Sep 1996 14:08:33 +0000 (+0100) Subject: perl 5.003_06: lib/Symbol.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c584b3313a7851a594fef241fac27f0a4e4bbce;hp=df76f08a516b9dffbe3a228618a7a70f1393e5fc;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_06: lib/Symbol.pm Date: Fri, 20 Sep 1996 12:38:14 +0200 From: Gisle Aas 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 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" 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. --- diff --git a/lib/Symbol.pm b/lib/Symbol.pm index 67808af..75d1dfb 100644 --- a/lib/Symbol.pm +++ b/lib/Symbol.pm @@ -34,7 +34,7 @@ support anonymous globs, C is also provided. But it doesn't do anything. C turns unqualified symbol names into qualified -variable names (e.g. "myvar" -> "MyPackage::myvar"). If it is given a +variable names (e.g. "myvar" -E "MyPackage::myvar"). If it is given a second parameter, C 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 @@ -56,12 +56,7 @@ require Exporter; my $genpkg = "Symbol::"; my $genseq = 0; -my %global; -while () { - chomp; - $global{$_} = 1; -} -close DATA; +my %global = map {$_ => 1} qw(ARGV ARGVOUT ENV INC SIG STDERR STDIN STDOUT); sub gensym () { my $name = "GEN" . $genseq++; @@ -88,13 +83,3 @@ sub qualify ($;$) { } 1; - -__DATA__ -ARGV -ARGVOUT -ENV -INC -SIG -STDERR -STDIN -STDOUT