diff options
author | Bram <perl-rt@wizbit.be> | 2008-08-05 18:24:22 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-08-24 13:41:40 +0000 |
commit | 8c44bff1ac2926fc059ca84c916a04461ff5ad01 (patch) | |
tree | 3132558022ef7007ae1ebc6000a003c302da27d2 | |
parent | 990198f0755a90e7230c3598d2d36d7d5ef7d95e (diff) | |
download | perl-8c44bff1ac2926fc059ca84c916a04461ff5ad01.tar.gz |
[perl #57646] Weird non-equivalence between $::{'a'} = sub {} and *::a = sub {}
From: "Bram via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-29759-1218011060-645.57646-15-0@perl.org>
p4raw-id: //depot/perl@34221
-rw-r--r-- | pod/perlmod.pod | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 63f0be9d2c..3d5f3ad0a4 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -94,18 +94,9 @@ C<%main::>, or C<%::> for short. Likewise the symbol table for the nested package mentioned earlier is named C<%OUTER::INNER::>. The value in each entry of the hash is what you are referring to when you -use the C<*name> typeglob notation. In fact, the following have the same -effect, though the first is more efficient because it does the symbol -table lookups at compile time: +use the C<*name> typeglob notation. local *main::foo = *main::bar; - local $main::{foo} = $main::{bar}; - -(Be sure to note the B<vast> difference between the second line above -and C<local $main::foo = $main::bar>. The former is accessing the hash -C<%main::>, which is the symbol table of package C<main>. The latter is -simply assigning scalar C<$bar> in package C<main> to scalar C<$foo> of -the same package.) You can use this to print out all the variables in a package, for instance. The standard but antiquated F<dumpvar.pl> library and |