in reply to eval inside an object
I am messing around with eval since it's coolBlock eval (for exception handling) is cool; string eval is ... luke warm. OK, it is fun, but you should try to avoid it in production code. Quoting merlyn from •Re^2: Dynamically constructed function calls:
Do not resort to eval-string if other means are available. You're firing up the compiler (slower than almost any other solution), and exposing yourself to hard to debug and hard to secure practices.
Update: If you want a second opinion, see this quiz of the week where MJD states:
A good rule of thumb is that unless what you're trying to do is most clearly described as "compile and run arbitrary Perl code", it's probably a mistake to use 'eval' to do it.
|Comment on Re: eval inside an object|