note
liz
<I>While it is clear how it does the trick, it is really misleading about what the pragma does.</I><BR>
I have some of that feeling as well. But please note that this pragma is only intended to be called from the commandline (it actually emits a warning when you're trying to use it inside a script). So my thinking was, use "begin" as a pragma to activate certain =begin pod sections.
<P>
<I>I would rather have a debug pragma</I><BR>
I've thought about using =debug as a pod delimiter. The thing is that many pod processor generate a lot of noise when they encounter an unknown =pod delimiter. Wherease if they don't know how to handle =begin, they're supposed to ignore it.
<P>
<I>...a quick search and replace in your module shows that it can be done...</I><BR>
Indeed. That shouldn't be the problem. But causing headaches for maintainers of pod parsers may be a problem.
<P>
<I>...as a pragma with two parameters, one for the tag and one for the label to activate.</I><BR>
I think that would make it more confusing and obfuscating. I think the namespace idea that I head, may be more handy.
<P>
<I>... the code after the POD block disappears.</I><BR>
That's because:
<code>
print "before\n";
=pod
Whatever I want to include here.
Comments or code, it doesn't matter.
=begin DEBUGGING
print "inside\n";
=cut
print "after\n";
</code>
becomes after conversion:
<code>
print "before\n";
=pod
Whatever I want to include here.
Comments or code, it doesn't matter.
{
print "inside\n";
}
print "after\n";
</code>
which makes clear why the code disappears. I <I>could</I> check for that at the expense at a more complex filter. Or add another CAVEAT. Probably the first.
<P>
Thanks for the feedback.
<P>
Liz
323875
323891