in reply to Don't use 5.6.N

The problem is, it's not easy to find out for every module yours depends on what minimal version is needed. You may have to download lots of versions of the depended module for that. Similarly, I don't want to have all perl versions installed on my machine just so I can put accurate version declarations to a module.

Replies are listed 'Best First'.
Re^2: Don't use 5.6.N (guess low)
by tye (Sage) on Oct 18, 2007 at 17:17 UTC

    Which tells me that the best thing would be to not try to guess at what version of Perl to draw the line at (or to at least guess low). Only draw a line if you at least know that nothing before that line works. For example, if you know that your module doesn't work before 5.005 (not a hard thing to know, since there are so many features that don't work before then, for example, for my ...), then feel free to say "BEGIN { require 5.005 } # No 'for my'" even though the module may not work in even 5.006.

    Also feel free to not draw any line, IMHO. If Perl had a feature for declaring "I have tested this module as far back as version 5.006", then I'd encourage people to use it. I really need to write perlage.pod...

    - tye        

Re^2: Don't use 5.6.N
by xdg (Monsignor) on Oct 18, 2007 at 12:23 UTC

    My general feeling is that it's sufficient to put a use/require version statement for features you use in that file. It doesn't need to be a statement about every dependency. But if, for example, you use a 3-argument open, then at least flag that with a "use 5.006;" statement at the top of the file.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.