in reply to evaluating syntax of code blocks (code)

If your API is such that you are given a reference to a block of code (which is what your sample code indicates), then by definition, Perl has already parsed and verified the code's syntax as being correct, and there is no need for you to do so.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print
  • Comment on Re: evaluating syntax of code blocks (code)

Replies are listed 'Best First'.
Re: Re: evaluating syntax of code blocks (code)
by princepawn (Parson) on Jul 02, 2001 at 06:55 UTC
    Perl has already parsed and verified the code's syntax as being correct,
    Acting as deprecated's spokesperson, what he means is that the syntax projected into undesired semantics... had the semicolon been after the autoincrement, the projection would have been the intended one.

    One simple thing you can do is see if a line does not end in semicolon... assuming the program statements are simple, then each line shouldend with semicolon.

      I'm not sure I understand what you mean by "projected into undesired semantics". The myFunc that deprecated provided as an example will not compile, hence, it has no semantics to speak of.
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print