Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: eval inside an object

by eyepopslikeamosquito (Archbishop)
on Apr 28, 2005 at 12:29 UTC ( [id://452280]=note: print w/replies, xml ) Need Help??


in reply to eval inside an object

I am messing around with eval since it's cool
Block 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.

Somewhat related, symbolic references are also evil, as convincingly demonstrated by MJD in three parts: part 1 and part 2 and part 3.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-03-28 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found