develooper Front page | perl.perl5.porters | Postings from April 2006

[perl #9540] RE: -d causes "Bizarre copy of HASH" error

From:
Animator via RT
Date:
April 27, 2006 12:10
Subject:
[perl #9540] RE: -d causes "Bizarre copy of HASH" error
Message ID:
rt-3.0.11-9540-132784.16.2712680050937@perl.org
> [RT_System - Wed Jun 12 09:15:39 2002]:
> 
> What it *should* do, AFAICS, is turn %$self into a string due to it
> being in scalar context, and then attempt to use that string as a
> symbolic reference.
> 
> That is, the following two things should produce identical error
> messages, but they don't:
> 
> C:\WINDOWS>perl -Mstrict -w
> @{ foo() }{1} = 1;
> sub foo { my %self; %self }
> __END__
> Can't use string ("0") as a HASH ref while "strict refs" in use at - line 1.
> 
> C:\WINDOWS>perl -Mstrict -w
> @{ my %self; %self }{1} = 1;
> __END__
> Bizarre copy of HASH in leave at - line 1.
> 
> Having two different error messages like this is, imho, a bug.
> 

Both lines now produce the same error in perl v5.9.3. 
perl v5.8.8 and bleadperl (and perl v5.9.2) however still output two different errors.


Regards,

Animator



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