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

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

Thread Previous | Thread Next
Paul Johnson
June 30, 2015 22:28
Re: extraneous autovivification (foreach (@$x), keys(%$x), ...)
Message ID:
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 -

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About