develooper Front page | perl.perl6.users | Postings from June 2018


Thread Previous | Thread Next
Brandon Allbery
June 14, 2018 17:31
Message ID:
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.) for more information.

On Thu, Jun 14, 2018 at 1:22 PM ToddAndMargo <> 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                        
unix, openafs, kerberos, infrastructure, xmonad

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About