Runtime evaluation
Any syntactically valid sequence of statements may be run, and the snippet to be run can see its outer lexical scope at the point of the eval
:
Unlike in Perl 5, eval
in Raku only compiles and executes the string, but does not trap exceptions. You must say try eval
to get that behavior (or supply a CATCH
block within the text to be evaluated).
Last updated