Exactly... As I said in the OP, I wasn't trying to suggest that people need to code for older perl versions. I was just suggesting that, much the same as use strict; has become basically a standard for good coding practice, so should software being version-aware.

As other monks have pointed out, I suppose I should add the caveat that code should be version-aware when it is using features that will break older versions.

In addition to a require/use version statement, putting something in the POD will alert users before they download and try to use the script/module/code.

This is not because I think that people should continue to use perl 5.005, but simply in acknowledgement of the fact that many people do use perl 5.005.

Authors should certainly use features available in higher versions -- that isn't my point. My point is, just make your code (and POD) reflect this.

Finally, re: Abigail-II's comments, I think there is an analogy between perl and HTML. There are a lot of people out there downloading CGI scripts and running them on commercial web hosts who are basically clueless end users when it comes to perl. They don't know what version of perl they have, and wouldn't know how to upgrade it if they did.

Also, you need access to the shell to do it -- not everyone has this, or else they have limited disk quotas that would not handle the installation.

However, the point I was really trying to make was from a programmer's perspective. HTML authors are always fooling around trying to make sure their fancy new layouts look alright in older browsers. At some point, you just have to write off Netscape<=4 or what have you. Similarly, if you are coding for an unknown user-group (ie a CGI script or something like that), at what point do you say "I don't care if this doesn't work in version X."

Of course, I wasn't trying to open this can of worms. :)

</ajdelore>


In reply to Re: Re: Re: Code should be version-aware by ajdelore
in thread Code should be version-aware by ajdelore

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.