Warnings are strong indicators of errors. Do you know the cause of the warnings you have received? If the warnings you received reveal code that needs to be fixed, then you can show their worth.

Are your coworkers planning on altering core and 3rd party modules as well? Wouldn't it be simpler to make warnings die noisily? Something as simple as $SIG{__WARN__} = sub { die ... }; might satisfy them.

The performance hit of warnings is negligible, IIRC. Feel free to Benchmark them.

Update: The following demonstrates that 100,000 warnings checks did not slow down Perl at all.

use strict; use warnings; use Benchmark qw( cmpthese ); my $passes = 100_000; my $tests = -10; sub with { use warnings; my $i = 0; $i = $i + 1 # Undefined check for 0..$passes; 1; } sub without { no warnings; my $i = 0; $i = $i + 1 # No undefined check for 0..$passes; 1; } cmpthese($tests, { with => \&with, without => \&without, });

outputs

Benchmark: running with, without, each for at least 10 CPU seconds... with: 10 wallclock secs (10.24 usr + 0.00 sys = 10.24 CPU) @ 20 +.40/s (n=209) without: 11 wallclock secs (10.40 usr + 0.01 sys = 10.41 CPU) @ 20 +.47/s (n=213) Rate with without with 20.4/s -- -0% without 20.5/s 0% --

In reply to Re: Warnings and Strict in Production/Performance by ikegami
in thread Warnings and Strict in Production/Performance by deep submerge

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.