summaryrefslogtreecommitdiff
path: root/lib/Symbol.pm
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-20 15:08:33 +0100
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-20 15:08:33 +0100
commit7c584b3313a7851a594fef241fac27f0a4e4bbce (patch)
tree3cbfe5ccb38feb569c830ef4f292b4fae8a543eb /lib/Symbol.pm
parentdf76f08a516b9dffbe3a228618a7a70f1393e5fc (diff)
downloadperl-7c584b3313a7851a594fef241fac27f0a4e4bbce.tar.gz
perl 5.003_06: lib/Symbol.pm
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.
Diffstat (limited to 'lib/Symbol.pm')
-rw-r--r--lib/Symbol.pm19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/Symbol.pm b/lib/Symbol.pm
index 67808af082..75d1dfb1fa 100644
--- a/lib/Symbol.pm
+++ b/lib/Symbol.pm
@@ -34,7 +34,7 @@ support anonymous globs, C<Symbol::ungensym> is also provided.
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
@@ -56,12 +56,7 @@ require Exporter;
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++;
@@ -88,13 +83,3 @@ sub qualify ($;$) {
}
1;
-
-__DATA__
-ARGV
-ARGVOUT
-ENV
-INC
-SIG
-STDERR
-STDIN
-STDOUT