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

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

Thread Previous | Thread Next
From:
Paul Johnson
Date:
June 30, 2015 22:28
Subject:
Re: extraneous autovivification (foreach (@$x), keys(%$x), ...)
Message ID:
20150630222829.GE22905@pjcj.net
On Tue, Jun 30, 2015 at 06:02:12PM -0400, Ricardo Signes wrote:

> Second, if so, we could at least look for how much CPAN would break.
> 
> At first blush, I'm not sure I like to imagine that anyone is relying on this
> behavior, but of course it is possible that there are reasonable reasons to do
> so.  Somewhere.

I would imagine it would usually be unintentional reliance, and that the
fix would lead to errors of the sort: "Can't use an undefined value as
an ARRAY reference at ..."

Perhaps we could have the equivalent of a deprecation cycle in which the
autovivification still happened but was warned about?

-- 
Paul Johnson - paul@pjcj.net
http://www.pjcj.net

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