Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Very simple rules implementation

by Eliya (Vicar)
on May 17, 2012 at 22:14 UTC ( #971183=note: print w/ replies, xml ) Need Help??

in reply to Very simple rules implementation

As for eval slowing down your system, don't worry — unless you're eval'ing those config snippets millions of times... (on my system, the given piece of code wrapped in a sub can be eval'ed and executed roughly 50000 times per second).

The security worries, OTOH, are justified, presuming you can't trust your users, and the code isn't being run under their own user ID anyway (in which case I wouldn't worry too much...)   You might want to look into Safe to restrict the opcodes that can be used.

Comment on Re: Very simple rules implementation
Download Code
Replies are listed 'Best First'.
Re^2: Very simple rules implementation
by SuicideJunkie (Vicar) on May 18, 2012 at 14:47 UTC

    You can't trust your users, and you shouldn't even trust yourself.

    Without protection, one little typo or context failure and you're overwriting your backups with the corrupt version, or perhaps deleting your entire harddrive.

    Yeah, I really should have set the physical write-protect on that final backup...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971183]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2015-10-05 00:26 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (105 votes), past polls