Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Why version strings?

by sundialsvc4 (Abbot)
on Mar 28, 2011 at 22:47 UTC ( #896046=note: print w/replies, xml ) Need Help??


in reply to Re: Why version strings?
in thread Why version strings?

(Not really a “reply” ... oops.)

“Quirky” though such a notion may seem to be at first blush, there actually is a reason for it, and it is arguably the best-all-around engineering choice that could have been made.

use versionstring is a pragma which Perl has supported for a very long time.   Both older and newer Perls will understand it, and the older ones will also know to reject5.012.”   External code which knows how to search a source-file for a use versionstring statement, such as CPAN, also will continue to see what it needs to see ... without needing to be upgraded in order to “do the right thing.”

If you intend to use a new or redefined feature, then of course you will do whatever it takes to do so.   But that’s really not what this application of use is all about.   The goal of this design is to prevent older Perl installations from running into trouble with newer code ... and to prevent newer interpreter versions from doing the wrong thing with older code.   A barrier mechanism had to be devised, such that it would work correctly whether it was included, or (certainly more likely to be the case...) omitted, and that would be backward-compatible.

Replies are listed 'Best First'.
Re^3: Why version strings?
by ikegami (Pope) on Mar 28, 2011 at 23:00 UTC

    I don't see how this relates to the OP at all. He asked why the new features of a language (e.g. say) weren't on by default. He didn't mention or imply any issue with the use of use version; you describe.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://896046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-05-14 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (147 votes). Check out past polls.

    Notices?