in reply to Module implementing modified comment-style debugging.

See Smart::Comments - the technique applied is a "source filter", which is fraught with other problems but likely the best you can get with Perl 5.

  • Comment on Re: Module implementing modified comment-style debugging.

Replies are listed 'Best First'.
Re^2: Module implementing modified comment-style debugging.
by Socrates (Acolyte) on Apr 30, 2008 at 18:19 UTC
    I'm assuming that by "fraught with other problems" you're referring to the "looks smarter than it really is" aspect mentioned on the Smart::Comments CPAN page? What other sorts of problems might arise?

      Source filters are generally problematic because they have to implement a parser for (parts of) Perl in Perl and usually do a bad job of this. Most of the time they work and when they fail it will take you a long time to track down the cause, unless you already know to look for tell-tale signs like the line use Switch;.

      If you're lucky, the filter implements a very limited language, like Querylet does and possibly Smart::Comments does as well.