in reply to Code should be version-aware
As far as use warnings; is concerned ... i strongly believe there should be some (even "fake") warnings.pm module for perl 5.005 (or even older versions). I don't really mind if no warnings 'foo' turns off warnings completely in older perls, but the fact that as soon as you use warnings the code is incompatible with older perls is really annoying.
Actually ... there seems to be a rather easy way to make sure use warnings doesn't kill the script without having to add any file anywhere :
Of course this makes the use warnings ... completely ignored.BEGIN { $INC{'warnings.pm'} = 'ignore' if ($] < 5.006 and !exists $INC{'warnings.pm'}) ; }
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Code should be version-aware
by liz (Monsignor) on Aug 13, 2003 at 11:29 UTC |