develooper Front page | perl.perl5.porters | Postings from July 2015

Re: extraneous autovivification (foreach (@$x), keys(%$x), ...)

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 1, 2015 05:37
Subject:
Re: extraneous autovivification (foreach (@$x), keys(%$x), ...)
Message ID:
CALJW-qEMPebE-nr4Q-MFXkow36SG0WoEiRzw7GCwRZa=dbzZkA@mail.gmail.com
On Tue, Jun 30, 2015 at 7:36 PM, Christian Millour <cm.perl@abtela.com>
wrote:

> Le 01/07/2015 00:02, Ricardo Signes a écrit :
>
>> * Aristotle Pagaltzis <pagaltzis@gmx.de> [2015-06-30T17:16:14]
>>
>>> Maybe we cannot change that now. And if we cannot change it, we cannot
>>> change it. But I wish we *knew* that, for having tried it – instead of
>>> just forever wondering.
>>>
>>> And maybe we would instead find that we can.
>>>
>>
>> First, could we control this lexically so that we had a proper core
>> version of
>> "no autovivification" that didn't mean we have to pester Vincent every
>> time we
>> change the internals?
>>
>>
> interestingly, foreach (@{...}) defeats 'no autovivification' :
>

Not quite.

no autovivification;


means

no autovivification qw( fetch exists delete );


You'd need

no autovivification qw( fetch store exists delete );


to disable autovivification of lvalues.

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