Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Personally, I have

use warnings FATAL => 'all';
in my production scripts. But I'm kind of a masochist that way. Mind you, near the top level I also run everything in a big eval block (ok, it's actually a small block that calls the main code) so that I can log/trace the errors, too.

What you do depends on your ideology here. Some people prefer to remove strict/warnings so that the code "just works". But I look at as "just works wrong". Sometimes it works right, but that's actually an accident more than by design. If I have a design point where I want no warnings for a piece of code, I create a block for it, and do something like this:

{ # we actually want to treat undefs as empty strings, just easier tha +t # way here. no warnings 'uninitialized'; ... # code that might use undefs legitimately goes here }
And thus any warnings that my production code still emits is actually against the design, or at least not yet evaluated, and only an accident would lead to good behaviour if I had them removed.

Your webpage question is already answered correctly: stderr doesn't go back to the web browser, it goes into the error log file of your web server.

Update: bad typo, thanks tye and AnomalousMonk.


In reply to Re: Turn off warnings, diagnostics? by Tanktalus
in thread Turn off warnings, diagnostics? by Anonymous Monk

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-18 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found