We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7490425 commit 598f746Copy full SHA for 598f746
doc/Type/independent-routines.pod6
@@ -36,8 +36,13 @@ This can be overridden in any of several ways:
36
use MONKEY; # shortcut that turns on all MONKEY pragmas
37
use Test;
38
39
+ my $init = 0;
40
+ my $diff = 10;
41
+ my Str $changer = '$init += ' ~ $diff; # contains a Str object with value '$init += 10'
42
# any of the above allows:
- EVAL "say { 5 + 5 }"; # OUTPUT: «10»
43
+ EVAL $changer;
44
45
+ say $init; # OUTPUT: «20»
46
47
In case the C<MONKEY-SEE-NO-EVAL> pragma is not activated, the compiler will
48
complain with a C<EVAL is a very dangerous function!!!> exception. And it is
0 commit comments