We have many machines, all running SunOS 2.6-5.8 (except my lonely little OpenBSD machine), and all running perl 5.003-5.0053. I see continual snippets that look like this:
This really is a rather tame example. There are things more like this deployed:$mailprog = '/usr/lib/sendmail'; sub send_mail { open (MAIL, "|$mailprog -t -oi"); print MAIL "To: $toemail\n"; print MAIL "From: $fromemail\n"; print MAIL "Subject: $thistitle\n"; # ... close MAIL; }
But I digress. What irks me is that there is a definite opposition to "upgrading" and installing modules. I think it was Nat Torkington who said that CPAN was perl's "killer app." He (or whomever) was right. I have a case here where a lot of this client's code could be simplified, modularized, and securified. However, nobody wants to install modules, and nobody wants to upgrade to a new version of, say, CGI.pm, for fear that some of the older scripts will be broken.open FILE, "$string_from_insecure_webpage";
tilly continually gets into it with me over my use of our versus use vars. We've discussed other things like this. I have heard from many people that my wanting to upgrade to perl 5.6 from 5.003 is unreasonable.
I'm tired of hearing that!!! Code should be flexible. If you write code that isnt written exactly as the API suggests you write, youre being a bad programmer. If you want to say:
I hope your script DOES break, and I hope you pay me to fix it. If I cant write fluid, reasonable code using tools available to me because your code is hanging together by deprecated pieces of syntactic bubblegum and duct tape, you are hurting both of us. I cant write the responsible code I want to write, and your script breaks when you look at it cross-eyed.use CGI :standard; # instead of... use CGI qw{ :standard };
The reason this is on my mind is I have written a program that uses CGI.pm's cool sub Vars, which must be imported via :cgi-lib. The older copy of CGI doesnt have it. Looking at the readme from the newer CGI, I see this warning:
Because the site is composed of roughly 200 individual scripts, all using #!/usr/local/bin/perl rather than #!/usr/local/bin/perlX.XXX, I am positive I am going to break at least one or two of them upgrading. Having to install a whole new copy of perl for one piddly module (albeit CGI) is a real waste of resources and time.Versions 2.44-2.46 introduce two API changes that will affect users of previous versions: 1) The accept() function has been renamed Accept() to avoid conflictin +g with Perl's built-in function of the same name. 2) The sub() function has been renamed Sub() for similar reasons. My apologies for these changes, but they were necessary in order for CGI to pass the perl5.005 regression tests!
I'd really like it if some of the "dont upgrade" people could explain their reasoning, and tell me why I am wrong to want them to write reasonable, fluid, and upgradeable code.
What are you people going to do when perl 6 comes out? Huh?
what is the sound of one dep fuming?
--
Laziness, Impatience, Hubris, and Generosity.
In reply to de-inventing the wheel (discussion) by deprecated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |