Skip to content

Commit 804e4b0

Browse files
committed
Reflow and some rephrasing
1 parent 39575cc commit 804e4b0

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

doc/Type/Cool.pod6

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,11 +1430,12 @@ method EVAL(*%_)
14301430
=for code
14311431
sub EVAL($code where Cool|Blob, :$lang = 'perl6')
14321432
1433-
If it is invoked as a method, it actually calls the subroutine form with
1433+
If it is invoked as a method, it calls the subroutine form with
14341434
invocant as the first argument, C<$code>, passing along named args, if any; this
1435-
coerces L<Cool|/type/Cool> C<$code> to L<Str|/type/Str>. If C<$code> is a L<Blob|/type/Blob>, it'll be processed
1436-
using the same encoding as the C<$lang> compiler would: for C<perl6> C<$lang>,
1437-
uses C<utf-8>; for C<Perl5>, processes using the same rules as C<perl>.
1435+
coerces L<Cool|/type/Cool> C<$code> to L<Str|/type/Str>. If C<$code> is a
1436+
L<Blob|/type/Blob>, it'll be processed using the same encoding as the C<$lang>
1437+
compiler would: for C<perl6> C<$lang>, uses C<utf-8>; for C<Perl5>, processes
1438+
using the same rules as C<perl>.
14381439
14391440
This works as-is with a literal string parameter. More complex input,
14401441
such as a variable or string with embedded code, is illegal by default.
@@ -1447,17 +1448,17 @@ This can be overridden in any of several ways:
14471448
# any of the above allows:
14481449
EVAL "say { 5 + 5 }"; # OUTPUT: «10␤»
14491450
1450-
In case the C<MONKEY-SEE-NO-EVAL> pragma is not activated, the compiler
1451-
will complain with a C<EVAL is a very dangerous function!!!> exception.
1452-
And it is essentially right, since that will run arbitrary code with the
1453-
same permissions as the program. You should take care of cleaning the
1454-
code that is going to pass through EVAL if you activate the
1455-
C<MONKEY-SEE-NO-EVAL> pragma.
1451+
In case the C<MONKEY-SEE-NO-EVAL> pragma is not activated, the compiler will
1452+
complain with a C<EVAL is a very dangerous function!!!> exception. And it is
1453+
essentially right, since that will run arbitrary code with the same permissions
1454+
as the program. You should take care of cleaning the code that is going to pass
1455+
through EVAL if you activate the C<MONKEY-SEE-NO-EVAL> pragma.
14561456
14571457
Please note that you can interpolate to create routine names using
14581458
quotation, as can be seen in
14591459
L<this example|/language/quoting#index-entry-%26_(interpolation)>
1460-
or L<other ways to interpolate to create identifier names|/language/syntax#Identifiers>.
1460+
or
1461+
L<other ways to interpolate to create identifier names|/language/syntax#Identifiers>.
14611462
This only works, however, for already declared functions and other
14621463
objects and is thus safer to use.
14631464

0 commit comments

Comments
 (0)