develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000307.002] Symbol table doesn't contain typeglob (was: mysendmail ...)

From:
M.J.T. Guy
Date:
March 7, 2000 04:25
Subject:
[ID 20000307.002] Symbol table doesn't contain typeglob (was: mysendmail ...)
Message ID:
E12SJ2r-0000ew-00@ursa.cus.cam.ac.uk
[ This is a reply to Jeff's message on p5p.   I'm sending it via
  perlbug@perl.com to get a bugid.                                   ]

Jeff Pinyan <jeffp@crusoe.net> wrote
> my sendmail isn't agreeing with perlbug, so...

Do you mean "disagreeing with the perlbug program" or "disagreeing with
perlbug@perl.com" ?    You can always mail reports directly to
perlbug@perl.com in order to get a bugid, perhaps preparing them using
the -F option of perlbug (the program).

> It's a bit puzzling to me, since I've been told from #perl-folk that it   
> prints *main::bar (not -1) in 5.004.

Both examples print "*main::bar" in all versions of Perl up to 5.004_05.
They print "-1" and "$@" in all versions from 5.005 onwards.

Ilya says this is a deliberate change.   But it causes the following
from perlmod to be incorrect:

     The value in each entry of the hash is what you are
     referring to when you use the *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:

         local *main::foo    = *main::bar;
         local $main::{foo}  = $main::{bar};

And I can find no relevant entry in either perl5.005delta or perldelta.

So someething needs fixing, even if it's only the documentation.


Mike Guy



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About