This is why it is a sin to "use warnings" in modules. :) I never do that. I always do "-w" in my *.t files instead.
If I want to see warnings from your module, then I'll use "-w". You shouldn't be telling me whether or not I want to see warnings from your module.
I actually hope that there is some warnings.pm magic that would let me turn on/off warnings from a specific package but nobody so far is familiar with such a feature (and I'm not and I don't see such documented in warnings).
You could certain go the moderately ugly route of writing a $SIG{__WARN__} handler to throw such away.
And you can use -X to disable all warnings. But I got the impression that you wanted to see your own warnings.
I'd certainly patch Contextual::Return to not "use warnings" (and add -w to all of the *.t files) and submit that back to the module's maintainer.
And it looks like there is room for improvement in making it easy to ignore warnings from a specific module (that did "use warnings" and didn't test well enough, likely).
- tye
In reply to Re: I don't care about *your* warnings! (-X)
by tye
in thread I don't care about *your* warnings!
by agianni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |