@@ -12,23 +12,18 @@ actually attached to any particular class or role.
12
12
Defined as:
13
13
14
14
= begin code :method
15
- method EVAL(*%_)
16
- = end code
17
- = begin code :method
18
- proto sub EVAL($code is copy where Blob|Cool|Callable, Str() :$lang = 'perl6',
15
+ proto sub EVAL($code where Blob|Cool|Callable, Str() :$lang = 'perl6',
19
16
PseudoStash :$context, *%n)
20
17
= end code
21
18
= begin code :method
22
19
multi sub EVAL($code, Str :$lang where { ($lang // '') eq 'Perl5' },
23
20
PseudoStash :$context)
24
21
= end code
25
22
26
- If it is invoked as a method, it calls the subroutine form with
27
- invocant as the first argument, C < $code > , passing along named args, if any; this
28
- coerces L < Cool|/type/Cool > C < $code > to L < Str|/type/Str > . If C < $code > is a
29
- L < Blob|/type/Blob > , it'll be processed using the same encoding as the C < $lang >
30
- compiler would: for C < perl6 > C < $lang > , uses C < utf-8 > ; for C < Perl5 > , processes
31
- using the same rules as C < perl > .
23
+ This routine coerces L < Cool|/type/Cool > C < $code > to L < Str|/type/Str > . If
24
+ C < $code > is a L < Blob|/type/Blob > , it'll be processed using the same encoding as
25
+ the C < $lang > compiler would: for C < perl6 > C < $lang > , uses C < utf-8 > ; for C < Perl5 > ,
26
+ processes using the same rules as C < perl > .
32
27
33
28
This works as-is with a literal string parameter. More complex input,
34
29
such as a variable or string with embedded code, is illegal by default.
0 commit comments