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
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |