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

[perl #133109] push on scalar forbidden: why?

Thread Previous | Thread Next
From:
Dan Book via RT
Date:
April 13, 2018 23:46
Subject:
[perl #133109] push on scalar forbidden: why?
Message ID:
rt-4.0.24-22021-1523663161-325.133109-15-0@perl.org
On Fri, 13 Apr 2018 16:43:47 -0700, grinnz@gmail.com wrote:
> This was an experimental feature added in 5.14:
> https://metacpan.org/pod/perl5140delta#Array-and-hash-container-
> functions-accept-references and then removed in 5.24:
> https://metacpan.org/pod/perl5240delta#The-autoderef-feature-has-been-
> removed . One of the biggest problems with it is that there's no
> correct way to handle an object with both hash and array overloads
> defined.

Also, adding an @ to dereference it is a very simple workaround, and will autovivify an undefined scalar used in this manner.

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133109

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