[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] syntax barriers?



On Sun, May 13, 2001 at 09:30:51PM +0200, Marc Lehmann wrote:
> > > Can you improve the "[]" solution or even find the perfect "syntax/error
> > > barrier"?
> > > 
> > 
> > How about:
> > eval qq{\n# line 40 "hulla"\n$user_code};
> 
> well, while this is a nice solution, it isn't really solving the problem
> (obviously, there is an eval "" outside all this code, so this is
> mitigating the problem one level into the code, but really a solution).

I guess I don't really understand what the problem is...  You want to
evaluate a block of user code, separate from other code in the program, but
you don't want to use eval?

Could you clarify the problem for us?

> my only grief with that is that i have to duplicate the ugly code around
> the eval that ensure that the context for the eval is set correctly, that
> exceptions propagate correctly (and perl does not crash) and lastly there
> are some issues with eval and utf8 ;)

What is the context that needs to be set for the eval?


Ronald

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe