Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I'd certainly turn off diagnostics. No point engaging all of that machinery in order to repeatedly verbosely explain every error and warning over and over again in the log.

I often support turning off warnings in many environments. But that depends on where the warnings go and are they likely to do any good. Warnings going to end-users is usually worse than a waste but also confusing and/or annoying.

Warnings going to the web server error log is often of little benefit but at little cost. There is a risk of a few pointless warnings getting logged at such a high frequency that they cause logs to fill disk or just make it unnecessarily cumbersome to notice, find, organize, or respond to more serious errors in the log.

There is also the chance for a developer to notice a warning in the log and from that figure out a subtle bug and fix it.

But I'd definitely not put "use warnings;" in your modules. Whether or not warnings are desirable depends on environment and so should be controlled by environment (with the caveat that there is a risk, small in my recent experience, of depending on somebody else's module that is sloppy about something that ultimately doesn't matter but that generates warnings when you enable them globally and yet you don't want to "fix" that warning because it isn't your module -- but a simple __WARN__ handler can usually easily plonk those).

Even more clear to me is that you should at least start with -w in the #!-line of your test scripts.

Whether to put -w in your web scripts is a harder call. Depends how likely developers are to make improvements due to those warnings ending up in the logs on that web server (I'd certainly turn on warnings in non-Production web servers and encourage routine review of web error logs by developers and QA) and how likely the warnings are to be voluminous enough to cause problems.

- tye        

In reply to Re: Turn off warnings, diagnostics? (maybe, yes) by tye
in thread Turn off warnings, diagnostics? by Anonymous Monk

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
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (4)
    As of 2018-07-16 05:05 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (332 votes). Check out past polls.