in reply to Re^2: $^W or require warnings and import warnings;
in thread $^W or require warnings and import warnings;

The problem I have with blindly including something like this is that if you expect a script to work on an ancient version of perl you need to go through hoops to avoid using newer constructs/modules, and more importantly, you really should test your script on those old versions. It's nice to be compatible, but if your script breaks on an ancient version of perl that you "support" you are not doing the poor user any favors. It's actually nicer in the long run to just say "we require 5.6 or newer" and let them install a separate copy of perl if they need to.

Please note that I'm not saying they are doing this in this particular case, perhaps they have actually tested this on older perls. It just that it seems that way to me at first glance from the posted snippet (which may be assuming too much)...

  • Comment on Re^3: $^W or require warnings and import warnings;

Replies are listed 'Best First'.
Re^4: $^W or require warnings and import warnings;
by Transient (Hermit) on Jun 15, 2005 at 18:35 UTC
    That I definitely agree with. If there is any portion of the module that does not support pre-5.6, then it is much better to simply require 5.6 instead.