Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^3: Subroutine Time::HiRes::Time redefined ... Help

by Laurent_R (Canon)
on May 04, 2018 at 08:32 UTC ( #1214041=note: print w/replies, xml ) Need Help??

in reply to Re^2: Subroutine Time::HiRes::Time redefined ... Help
in thread Subroutine Time::HiRes::Time redefined ... Help

Basically, the -w flag is an all-or-nothing construct. It enables warnings everywhere in your code, including in the modules you use and you haven't written yourself. The use warnings; pragma, by contrast, is lexically scoped, so it does not overlap on other pieces of code used in your program. And you can turn it on or off for some chunks of code or for some specific warnings categories.

I basically use the -w flag only for one-liners. The use warnings; pragma is much better for all other cases.

See's-wrong-with-*-w*-and-%24%5eW for more details.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2021-02-27 03:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found