develooper Front page | perl.perl5.porters | Postings from May 2003

Re: [perl #22238] Bizarre copy of HASH in leave

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
May 21, 2003 07:15
Subject:
Re: [perl #22238] Bizarre copy of HASH in leave
Message ID:
20030521141507.GC1161@fdgroup.com
On Mon, May 19, 2003 at 11:01:31PM +0200, Abe Timmerman wrote:
> Op een zonnige lentedag (Monday 19 May 2003 21:35), schreef Dave Mitchell:
> 
> > On Mon, May 19, 2003 at 02:44:57AM -0000, Andreas Koenig wrote:
> > > Uli Pfeifer sent me this one to check agains dev perls. Yes, the bug is
> > > confirmed against blead@19558 and maint@19553:
> > >
> > > % perl -Te '@{%h}{x}'
> > > Bizarre copy of HASH in leave at -e line 1.
> >
> > This is just a rehash (surely a pun somewhere?) of what I reduced bug
> > id #3420 to. I'm not sure it needs a new ticket...
> 
> Looking at that report and the above, I'd say they're the same.  Am I
> right in feeling that this should be a syntax error or at least some
> sort of funny runtime-warning like (under warnings) "Can't use '1/8' as
> a hashref"?

No, its not a hashref, its a symbolic ref thing, eg the following

    $i = 50;
    @{"hash".$i}{'a','b'} = (1,2)

is a roundabout way of doing

    @hash50{'a','b'} = (1,2)

ie the thing within the first set of {} braces is supposed to return a
name to be looked up in a stash, not  a hashref.

> It looks to me like the "-T" branch in the code is getting something right 
> (except for the cryptic error).

So I think the -T branch is wrong.

-- 
print+qq&$}$"$/$s$,$*${$}$g$s$@$.$q$,$:$.$q$^$,$@$*$~$;$.$q$m&if+map{m,^\d{0\,},,${$::{$'}}=chr($"+=$&||1)}q&10m22,42}6:17*2~2.3@3;^2$g3q/s"&=~m*\d\*.*g

Thread Previous | Thread Next


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