Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: When should you not use strict and warnings?

by BrowserUk (Pope)
on Dec 27, 2012 at 13:09 UTC ( #1010525=note: print w/ replies, xml ) Need Help??


in reply to When should you not use strict and warnings?

The only reason I can think of for turning them off completely is to try and gain a little performance once you've completely debugged the program.

I tried this a few times in the past and found that it rarely, if ever, made any significant measurable difference.

Conversely, I almost always found yet another code or algorithmic change that would speed things up; but I always had to re-enable B&D to find bugs introduced by those changes.

(My) Bottom line, I always turn them on when I start a script, and for the last 8 years or more never even think about turning them off, except for very small scopes.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: When should you not use strict and warnings?
Re^2: When should you not use strict and warnings?
by Anonymous Monk on Dec 27, 2012 at 17:24 UTC

    I think Exporter::Lite complained about how use strict slowed down the compile. Of course, it's a tiny module -- for pretty much anything non-tiny, the overhead added by strict is negligible.

    package Exporter::Lite; require 5.004; # Using strict or vars almost doubles our load time. Turn them back # on when debugging. #use strict 'vars'; # we're going to be doing a lot of sym refs #use vars qw($VERSION @EXPORT);

    (My) Bottom line, I always turn them on when I start a script, and for the last 8 years or more never even think about turning them off, except for very small scopes.

    I often forget to turn them on for a brand-new script and then wonder why my script is not working =(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010525]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2014-08-30 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls