in reply to Injecting a filter into warn()

How about inserting the line:

no warnings 'uninitialized';
inside the offending module?

If you're worried about tracking changes to third party code, a simple (primitive) solution is to use a unique string to identify your changes, for example:

no warnings 'uninitialized'; ### __MidLifeXis__

Replies are listed 'Best First'.
Re^2: Injecting a filter into warn()
by MidLifeXis (Monsignor) on Mar 10, 2005 at 21:14 UTC

    I thought of that, but did not want to remove all warnings of that type. Just the ones from the third party module.

    tye hit the nail on the head (in the cb) - I had a -w in my shebang line.

    Update: Clarified wording slightly.

    --MidLifeXis

      I thought of that, but did not want to remove all warnings of that type. Just the ones from the third party module.
      But if you insert the line inside the module, it only applies to that module. Generally, the warnings pragma is limited to the enclosing block -- so you could even apply it selectively to functions or blocks of the offending module if you wished.

      Don't get me wrong, I agree switching off the -w in the shebang line seems the best solution.

      You could use warnings instead of using -w. -w affects all lines processed by perl, no matter which module its parsing at the moment. use warnings only affects the module (or block) in which its located.