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

Re: Turn off warnings, diagnostics?

by Tanktalus (Canon)
on Nov 07, 2012 at 16:51 UTC ( #1002696=note: print w/replies, xml ) Need Help??

in reply to Turn off warnings, diagnostics?

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002696]
[Corion]: Do you want to launch a script and keep the command prompt/console window open?
[Corion]: Do you want to wait for a key press before closing the window?
[LanX]: I want the command line in the history
[tye]: -Mouse
[Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
[LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
[Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
LanX damns the cult of CB ;-)
[LanX]: please forget my last 3 posts

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-03-27 15:46 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.