tests for the general case of { temp %hash<key-doesnt-exist> = 42 } restoring non-existence after temp exit:
https://github.com/perl6/roast/commit/9977e560ffddf6c47e621610dfbb384d3c20aa56 On Sat, Dec 12, 2015 at 9:07 PM Lloyd Fournier <lloyd.fo...@gmail.com> wrote: > I managed to golf this a bit: > > perl6 -e '{ temp %*ENV<FOO> = "1" }; say %*ENV<FOO>:exists # True > > That should be False IMO. The value at <FOO> isn't 1, looks like Any from > p6, but I think at a lower level it's holding something nasty that trips up > nqp. > > But this warning is not just caused by this example it's all over the > place: > > https://rt.perl.org/Public/Bug/Display.html?id=126880 > https://rt.perl.org/Public/Bug/Display.html?id=126840 > > in #126880 it's caused by "RAKUDO_PRECOMP_DIST" key in ENV seemingly > leaking out of compile time (but not taking it's value wih it). temp isn't > used there. > > > > > > On Tue, Oct 27, 2015 at 2:24 AM Shoichi Kaji <sk...@outlook.com> wrote: > >> Thank you for your quick fix! >> >> It works, but a warning is emitted. >> >> $ perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" >> }' >> Use of uninitialized value %ENV of type Any in string context >> Any of .^name, .perl, .gist, or .say can stringify undefined things, >> if needed. in block at -e:1 >> Applications System bin etc net sbin var >> >> 2015-10-25 23:32 GMT+09:00 Elizabeth Mattijsen via RT >> <perl6-bugs-follo...@perl.org>: >> > Fixed with b0b2489a2cff7b56d61e8e , tests needed! >> > >> >> On 25 Oct 2015, at 11:49, Shoichi Kaji (via RT) < >> perl6-bugs-follo...@perl.org> wrote: >> >> >> >> # New Ticket Created by Shoichi Kaji >> >> # Please include the string: [perl #126447] >> >> # in the subject line of all future correspondence about this issue. >> >> # <URL: https://rt.perl.org/Ticket/Display.html?id=126447 > >> >> >> >> >> >>> perl6 -v >> >> This is perl6 version 2015.10-19-gd192f1c built on MoarVM version >> 2015.10 >> >> >> >>> perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run >> "ls" }' >> >> Cannot unbox a type object >> >> in block <unit> at -e:1 >> > >> > >> >