I fully agree that including a minimum Perl version is good coding practice, provided of course you know what you are doing and why you are doing it. In this case there is no reason to have a minimum version of Perl 5.6 and as the code was an exercise, one must check every statement and see whether it is correct and necessary.Update: Actually, according to Perl::MinimumVersion, the use warnings; pragma pushes the miminum version up to Perl 5.6.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |
In this case there is no reason to have a minimum version of Perl 5.6....
Indeed there is! This helps to prevent a future version of Perl 5 from using the wrong version of the grammar with this program.
You might as well argue that there's no reason to use strict with a specific piece of code because there are no stricture violations.
| [reply] |
Will future versions of Perl change their grammars according to a use Perl x.y.z pragma? That would be a nice trick. But wouldn't that break the present rule that the use Perl x.y.z indicates a minimum version only?
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] [select] |
No. That is what padre scripts default to if new scripts are made ...
Sometimes i forget to remove it ... http://padre.perlide.org
| [reply] |