Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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
Re^2: Very simple rules implementation
by SuicideJunkie (Priest) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2014-09-16 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls