Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Why stake claim to all =begin UPPERCASE?

Hmmm... good question. To my knowledge there are no pod parsers that use uppercase names. I want to prevent a pod parser by accident adding debug code to the documentation of a module.

Uppercase letters stand out. So in that sense you could say I'm staking this claim, but only visually!

Please note that you can use uppercase names for your own pod parsers. You just can't activate it with begin then, because you'll most likely get compile errors because your documentation inside that =begin section will most likely not be intended to be executed.

You should pick 1 and stick with it (=begin begin sounds good).

As a developer, I want to be free in the choosing of my names. You might want to use DEBUGGING for real debug code, and VERBOSE for just making your script a bit more verbose than usual. Or FOO for some temporary stuff.

You should note that the =debug sections are parsed for all modules once "begin" is loaded. Activating DEBUGGING will activate all of the =begin DEBUGGING pod sections of all modules. So I'm actually thinking of adding some namespace support for it, e.g:

perl -MBEGIN=forks::TRACE myscriptusingforks.pl
would only activate the =begin sections inside the forks.pm module, whereas:
perl -MBEGIN=TRACE myscriptusingforks.pl
currently activates all modules that have a =begin TRACE pod section.

Liz


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

Title:
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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (10)
    As of 2014-04-21 13:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (495 votes), past polls