in reply to Re^2: Injecting a filter into warn()
in thread Injecting a filter into warn()

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.