On Thu, Feb 15, 2001 at 11:30:07PM +0000, Simon Cozens wrote:
>
> Depends what sort of instrumentation you want. If you want instrumentation
> about how perl sees the code, you probably want my "mangle" patch. If you want
> instrumentation which can be produced by a Perl program, see
> http://perltidy.sourceforge.net/
Your recent efforts did pass through my mind, and I looked at perltidy
when you mentioned it on p5p. What is needed is a way to add callbacks
at strategic points in the code. Without thinking too hard, the start
of most blocks and a few other places where code branches would be a
minimum requirement.
Ideally, it should be done with the help of perl (as with your patch)
rather than by parsing (as with perltidy) because the parsing will get
it wrong eventually and will probably be harder and less efficient too.
There was talk at the start of Perl 6 about being able to modify the
parse tree or byte code or something on the fly. That is really what's
wanted.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net