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

Re: [FWP] syntax barriers?



On Sat, May 12, 2001 at 10:05:39AM -0700, Marc Lehmann wrote:

>    [do{
>      ## user code inserted here
>    }];
> 
> The above will catch most unnested-"{"-errors, but of course not all. The
> idea is that the nesting error will be detected by the parser much
> earlier (i.e. still in the right file). It, however, might even add more
> confusion. And the worst thing is, it alters the program, which is a
> problem when the whole string gets wrapped into a "sub { xxx }" and the
> "user code" is just subroutine declarations as well.
> 
> Can you improve the "[]" solution or even find the perfect "syntax/error
> barrier"?
> 

How about:

eval qq{\n# line 40 "hulla"\n$user_code};

?

Ronald

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