in reply to Don't use 5.6.N
Instead, use one of these:require 5.006; # run-time BEGIN { require 5.006; } # compile-time
I agree except for your comments. Instead you should only use:
require 5.006; # reason 5.006 is _required_
(with or without the BEGIN block).
There was (I hope it isn't still the case) a helper tool for creating modules that just stuffed in "require $];" into your module. This was a horrid idea.
"require 5.006;" does not mean "I haven't bothered to test with versions prior to Perl 5.006 and so can't guarantee that it works there". It means "I have tested on perls prior to 5.006 and can say for sure that this module fails on those versions" (well, it means at least the last half of that).
So, either leave off the "require 5.006" or add documentation about what you found (or just know) that doesn't work on such versions. Leaving it off isn't such a bad thing. The errors that result are usually pretty clear and tell you more than just "your Perl is too old", they highlight which new feature your old version of Perl doesn't support.
But, most importantly, don't add "require 5.006" (or whatever version of Perl) unless you actually know that such a version is really required.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Don't use 5.6.N (why)
by dragonchild (Archbishop) on Oct 17, 2007 at 17:03 UTC | |
by tye (Sage) on Oct 17, 2007 at 17:14 UTC | |
by dragonchild (Archbishop) on Oct 17, 2007 at 17:41 UTC | |
by tye (Sage) on Oct 17, 2007 at 18:05 UTC | |
by dragonchild (Archbishop) on Oct 17, 2007 at 18:14 UTC | |
|