Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
While it is clear how it does the trick, it is really misleading about what the pragma does.
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.

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. 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:

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";
becomes after conversion:
print "before\n"; =pod Whatever I want to include here. Comments or code, it doesn't matter. { print "inside\n"; } 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.

Thanks for the feedback.


In reply to Re: Re: Debug code out of production systems by liz
in thread Debug code out of production systems by liz

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Tux]: those 284 are all on my laptop (Linux x64)
    [Tanktalus]: Hmm, I only have 26 on my machine... :P
    [Tanktalus]: mind you, I don't generally keep the odd-numbered dev releases.
    [1nickt]: Ah, Tux is building threaded, unthreaded, debugging ... his usual thoroughness on display.
    [Tux]: I rebuilt all when I moved from a 32bit system to a 64bit syste. I still have the 32bit builds, but I think they will all fail
    [Tux]: 1nickt no a threaded and a unthreaded version per release
    [Tux]: Files/201709251843 04.png
    erix has 26 version of PostgreSQL
    Tux just 3
    [Tux]: but I <3 the way people test here

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (8)
    As of 2017-09-25 16:44 GMT
    Find Nodes?
      Voting Booth?
      During the recent solar eclipse, I:

      Results (284 votes). Check out past polls.