‘eval’ can see lexicals and other fixes

The Raku Programming Language Collect, Conserve and Remaster Project

‘eval’ can see lexicals and other fixes

Originally published on 14 March 2009 by Jonathan Worthington.

Back from my conference and vacation trip (travel tip: Lviv is very pretty and cheap), I did a Vienna.pm Rakudo Day yesterday. There’s one main new thing to shout about: eval can now see outer lexical variables. So this:

my $x = 42;
eval('say $x');

Will now print 42. This not only made the spectest for this particular feature pass, but also there were a bunch todo’d and skipped that needed this feature. So I reckon we’ll have gained a double-figure number of tests with this, plus it should help the Web.pm effort a bit.

I also did a variety of other fixes:

I also had discussions with various people (thanks to Larry, Allison, Tene and Patrick for input) about implementing .leave. Happily, Tene++ had thought it through a bit and had a good idea of how to do it. Which means I hopefully now don’t have to do it, and can just make use of it once it’s done to fix the auto-threading bug that sent me chasing after it in the first place.

As usual, a big thanks to Vienna.pm for funding my Rakudo hacking.