Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Small examples of string eval

by BrowserUk (Patriarch)
on May 13, 2006 at 18:12 UTC ( [id://549259]=note: print w/replies, xml ) Need Help??


in reply to Re: Small examples of string eval
in thread Small examples of string eval

But each of them knows when to eshew complicated eval-avoidance-schemes, in favour of simplicity.

merlyn See name_to_page() in CGI::Prototype::Hidden, new() in CGI::Prototype::Mecha, type() in File::Finder, the grammer for Inline::Spew.

TheDamian See import() in Attribute::Handlers, import() in Attribute::Types, install_dispatch() in Class::MultiMethods, initialise() & new() in Class::Std... I stopped here with D-Z to go.

Dominus memoize() in Memoize, in Memoize::AnyDBM_File, fill_in() inText::Template, TIEARRAY() in Tie::File.

And before anyone leaps to these authors defense, there is no need. String eval is a tool. Avoiding it where practical is common sense; eshewing at all costs is illogical.

I'm betting that Perl6 will retain string eval in some form.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Small examples of string eval
by spurperl (Priest) on May 14, 2006 at 03:59 UTC
    I was just going to reply that MJD's HOP also has a few legitimate uses of string eval. As you said it's a tool, a powerful tool, and as such it should be used with great caution.

    I really hope Perl 6 won't drop the string eval, having it IMHO is essential to any dynamic language.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found