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

Re: my $x->{foo} doesn't work

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
May 21, 2004 04:06
Subject:
Re: my $x->{foo} doesn't work
Message ID:
20040521130324.51f703f3@localhost
Dave Mitchell wrote:
> 
> Thinking about this some more; it could be argued that since op.c has already
> gone to the trouble of marking the padsv op with the OPpDEREF flag, that
> its a bug in pp_padsv for then ignoring that flag if it happens also to
> be marked with OPpLVAL_INTRO. That is to say,  ($x)->{foo} autovivifies
> but (my $x)->{foo} doesn't. Clearly the OP's patch was wrong because it
> threw out the baby with the bathwater, but maybe something like the
> following (untested):

which is the OP's second version :)
I still don't see why this would be a worthwhile language change. I've
no opinion on this in fact.

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