The following code works:
say "$a + 1".EVAL # OUTPUT: 芦2禄;
I expected that using the method form of EVAL would throw the same error as the subroutine form of EVAL
The method form of EVAL does not throw an error, even when used without the MONKEY-SEE-NO-EVAL
If this behavior not a bug, please let me know so that I can close this issue and open a raku/docs issue. If this behavior is intended and/or a known bug, we should note it in Cool.EVAL docs.
I expected that using the method form of EVAL would throw the same error as the subroutine form of EVAL
raku -e 'my $a = 0; say &EVAL("$a + 1")'
1
which is just to say there are probably more cases where the pragma doesn't work than where it does.
AFAIK, this behaviour is intentional.
AFAIK, this behavior is intentional.
Any references for that? It feels a bit more like an oversight to me. (As an aside: I'm not really a fan of the method form of EVAL.)