in reply to Re^4: Don't use 5.6.N (why guess?)
in thread Don't use 5.6.N

No, I didn't misunderstand. Neither warnings.pm nor our is ever a requirement. And in other threads I've even explained why I consider doing "use warnings;" in a module to be a mistake and why use vars is better than our.

The new features are usually quite minor improvements (and often mixed blessings). Though they are often touted (usually by their inventors and usually before anyone has had any time to really use them) as being profoundly important and people (understandably) tend to believe the standard documentation (written by the inventor of the new feature) and so this touting spreads.

But the further back you go, the larger the collection of minor features is and the more work it is to forego the sum total of these minor improvements.

Please at least include next to your "use 5.006;" line a pointer to the section in your POD that explains it (when you write it). And consider doing "BEGIN { require 5.006; }" so automated tools can better parse the failure reason.

- tye        

Replies are listed 'Best First'.
Re^6: Don't use 5.6.N (why guess?)
by dragonchild (Archbishop) on Oct 17, 2007 at 18:14 UTC
    I'm curious. You're recommending "BEGIN { require 5.006; }" instead of "use 5.006;". Aren't they identical?

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

      Yes, they are the same.

      The only thing you need to be careful of is to say 5.006 instead of 5.6.0. The former will spit out an error message that makes sense to testing tools, the later in a syntax error:

      $ perl-5.005_05/bin/perl -e 'use 5.6.0;' syntax error at -e line 1, near "use 5.6" Execution of -e aborted due to compilation errors.
      $ perl-5.005_05/bin/perl -e 'use 5.006;' Perl 5.006 required--this is only version 5.00505, stopped at -e line +1. BEGIN failed--compilation aborted at -e line 1.