Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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.

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2018-02-21 20:00 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (287 votes). Check out past polls.