Re: [perl #102994] State variables are never initialized if the first call of the containing block does not reach them

2016-08-19 Thread Nicholas Clark
On Fri, Aug 19, 2016 at 11:05:07AM -0700, Will Coleda via RT wrote: > On Sat Nov 05 09:12:36 2011, moritz wrote: > > 16:28 < moritz> perl6: sub f($x) { return if $x == 1; state %h = a => 1; > > say > > %h.perl }; f 1; f 2; > > 16:28 <+p6eval> niecza v11-20-gb962c2f: OUTPUT«{"a" => 1

[perl #102994] State variables are never initialized if the first call of the containing block does not reach them

2016-08-19 Thread Will Coleda via RT
On Sat Nov 05 09:12:36 2011, moritz wrote: > 16:28 < moritz> perl6: sub f($x) { return if $x == 1; state %h = a => 1; > say > %h.perl }; f 1; f 2; > 16:28 <+p6eval> niecza v11-20-gb962c2f: OUTPUT«{"a" => 1}.hash␤» > 16:28 <+p6eval> ..pugs b927740: OUTPUT«{("a" => 1),}␤» > 16:28 <+p6

[perl #102994] State variables are never initialized if the first call of the containing block does not reach them

2011-11-05 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #102994] # in the subject line of all future correspondence about this issue. # https://rt.perl.org:443/rt3/Ticket/Display.html?id=102994 > 16:28 < moritz> perl6: sub f($x) { return if $x == 1; state %h = a => 1; say