in reply to Re: #!/usr/bin/perl -w and use warnings;
in thread #!/usr/bin/perl -w and use warnings;

Yes, I never thought of that, in that it would be useful to only have warnings for some sections, but the "-w" would be good to check other people modules.

Do I understand that correctly?

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!
  • Comment on Re^2: #!/usr/bin/perl -w and use warnings;

Replies are listed 'Best First'.
Re^3: #!/usr/bin/perl -w and use warnings;
by tlm (Prior) on Apr 23, 2005 at 14:55 UTC

    The -w flag won't help you if the module's author explicitly turned warnings off. (I've run into this problem when a module's author turns off all warnings in a block, instead of selectively turning off a particular warning.) E.g.

    % perl -wle 'use warnings; { no warnings; $x == 1 } print "ok"' ok % perl -Wle 'use warnings; { no warnings; $x == 1 } print "ok"' Useless use of numeric eq (==) in void context at -e line 1. Name "main::x" used only once: possible typo at -e line 1. Use of uninitialized value in numeric eq (==) at -e line 1. ok

    Update: Clarified the original reply.

    the lowliest monk