[Phoenix-pm] perl eval and the No Execute chips

Jerry Davis jdawgaz at cox.net
Wed Sep 13 17:20:48 PDT 2006


On Wed, 13 Sep 2006 17:37:06 +0000
Scott Walters <scott@> wrote:

> Stops executing, starts parsing/compiling again, and then executes the
> result of that again.  I've said it before and I'll say it again...
> 95% of the time people eval, they really want a closure instead.

the reason I asked, is that I do make use of eval, and in what I think
is a legal way.

what I normally do in an eval, is on the command line I pass the name
of a file which is really a short perl script which is really a hash
full of static data.

sort of like:

our %h;

$h{somekey}{somesubkey} = value;
...

I then eval this file, which sets sets up my all my data, and I just
use that data in the program.

Different files hold exactly the same hash but with different values.

This has worked really really well for me, and I was just a little
alarmed over what I saw on /.

Jerry



> 
> -scott
> 
> On  0, Andrew Johnson <andypm at exiledplanet.org> wrote:
> > 
> >    On 9/12/06, Brock <[1]awwaiid at thelackthereof.org> wrote:
> >    
> >    <snip>
> >    
> >    
> >      But that's a bit of a side track. Really, let's expand the
> > question to
> >      this -- How does "eval" work?
> >      
> >    That's easy:  it's MAGIC!!  :-)
> >    [aj]
> > 
> > References
> > 
> >    1. mailto:awwaiid at thelackthereof.org
> 
> > _______________________________________________
> > Phoenix-pm mailing list
> > Phoenix-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/phoenix-pm
> _______________________________________________
> Phoenix-pm mailing list
> Phoenix-pm at pm.org
> http://mail.pm.org/mailman/listinfo/phoenix-pm


-- 
Happy Trails!
 
Hobbit Name: Pimpernel Loamsdown
Registered Linux User: 275424
 
Jeep Motto #2: Paved Roads are a Fine Example of Needless Government
Spending!


More information about the Phoenix-pm mailing list