Hi kennethk

My suggested code doesn't work... If it had worked I wouldn't have asked!

Here is a testing code:

Package:

package tt; use strict; use warnings; sub w { my $str = ""; return substr ($str, 10, 10); } 1;

Client script:

use strict; use tt; print tt::w();

Defining a local warning handler works perfectly:

use strict; use tt; local $SIG{__WARN__} = sub {}; print tt::w();

Thanks for the help

citromatik


In reply to Re^2: no module warnings in client code by citromatik
in thread no module warnings in client code by citromatik

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