[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-11 Thread jn...@jnthn.net via RT
On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h > {} > > %h > {b => 3} > > The array/hash variable's default is an empty array/hash literal.

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-11 Thread jn...@jnthn.net via RT
On Sat, 09 Sep 2017 19:53:53 -0700, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h > {} > > %h > {b => 3} > > The array/hash variable's default is an empty array/hash literal.

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-10 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #132053] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132053 > > my @h is default([]) [] > @h[0].push: 3 [3] > @h [] > @h[0] [3] > my %h is

[perl #132053] [BUG] Autovivification on element with [] or {} as default causes "secret" keys

2017-09-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Heh. FWIW we had this since forever: https://gist.github.com/Whateverable/78168042a011e01fc768c042b0d91898 On 2017-09-09 19:53:53, tomentiru...@gmail.com wrote: > > my @h is default([]) > [] > > @h[0].push: 3 > [3] > > @h > [] > > @h[0] > [3] > > > my %h is default({}) > {} > > %h = 3 > 3 > > %h