in reply to Re^5: Shebang behavior with perl (-w)
in thread Shebang behavior with perl

Thanks for the question. This eventually made me realize that I should update my practices.

I will continue to mostly use "-w" in scripts because I almost never have problems with modules producing unwanted warnings that I can't avoid. I will also continue to use "-w" in my module tests. But, for scripts where warnings are not useful, I will use "-X" and thus avoid being impacted by modules doing "use warnings" and enabling warnings that I don't want.

And I will be putting "use warnings;" in all of my modules, as this serves as an imperfect but still useful indication that they are modules that have been tested with warnings enabled and so are at least relatively unlikely to be one of those modules that generates unwanted warnings. This will allow people like MidLifeXis to benefit from (presumably useful) warnings from my modules without having to resort to "-w", which would be a problem due to his need to use vendor modules that aren't "warnings safe".

- tye        

  • Comment on Re^6: Shebang behavior with perl (use warnings)