In short, pragmas are all-same-case "use" names; instead of loading code,
they tell the compiler to change its behavior.

The MONKEY-* pragmas generally control various kinds of unsafe or dangerous
behavior, including direct access to the mechanisms underneath /
"supporting" Rakudo and things like EVAL. Other all-uppercase names also
generally represent "dangerous" actions or options.

There are a few pragmas that are all lowercase instead of all uppercase;
they also change the compiler's behavior, but are safer than the
all-uppercase ones. "use lib" is one of them. (This is why modules are
generally mixed-case names.)

https://docs.perl6.org/language/pragmas for more information.

On Thu, Jun 14, 2018 at 1:22 PM ToddAndMargo <toddandma...@zoho.com> wrote:

> On 06/13/2018 12:27 PM, Brandon Allbery wrote:
> > Exactly what it says: eval is a code injection attack waiting to happen.
> > If you actually need it, you get to do your own data sanitization, and
> > you tell Perl 6 you did so with "use MONKEY-SEE-NO-EVAL;".
>
> Hi Brandon,
>
> Thank you for clarifying.  My hand up with the error message
> was its wording:
>
>         "use the MONKEY-SEE-NO-EVAL pragma to override this error"
>
> 1) I did not realize the the word "use" mean the Perl "use".
> I though it meant the English usages as in go do something.
>
> 2) what the heck is a "pragma"?  Way to obscure.
>
> Your response cleared up the misunderstanding nicely.
>
> -T
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to