in reply to Re: Debug code out of production systems
in thread Debug code out of production systems
I would rather have a debug pragma
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.
...a quick search and replace in your module shows that it can be done...
Indeed. That shouldn't be the problem. But causing headaches for maintainers of pod parsers may be a problem.
...as a pragma with two parameters, one for the tag and one for the label to activate.
I think that would make it more confusing and obfuscating. I think the namespace idea that I head, may be more handy.
... the code after the POD block disappears.
That's because:
becomes after conversion: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";
which makes clear why the code disappears. I could check for that at the expense at a more complex filter. Or add another CAVEAT. Probably the first.print "before\n"; =pod Whatever I want to include here. Comments or code, it doesn't matter. { print "inside\n"; } print "after\n";
Thanks for the feedback.
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Debug code out of production systems
by shotgunefx (Parson) on Jan 25, 2004 at 19:41 UTC |