in reply to using modules with 'no warnings' in perl 5.005
If this is for suppression for runtime warnings, as I think it is, my thought would be to just localize $^W, making it false. For example:
{ local $^W; # disable runtime warnings for this block # For example: $str = join "#", 'A', undef, 'B'; }
If a module depends on warnings.pm, it might also include some other stuff that only works on 5.6 and up. You never know.
If, however, the above patch actually does what is wanted, and the module works on 5.005, and if this is an official module on CPAN, I would like to have steps taken to remove this dependency from the official distribution.
|
---|