Welcome to WebmasterWorld Guest from 52.91.39.106

Forum Moderators: coopster & jatar k & phranque

Update Perl or no?

If it ain't broke don't fix it?

     
7:56 pm on May 3, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1095
votes: 103


I tend to fall in the "if it ain't broke don't fix it" category, with the exception of critical updates.

But I just realized that I'm running Perl v5.10.1, that had an EOL in 2009! That might be a bit much.

I really need at least 5.14.4 to use some features that I want, but I'm nervous about updating. I have several hosted clients that use Perl (even if they don't know it), and some of them haven't been updated in YEARS! I worry about updating Perl and then some of their modules stop working.

So what do you guys think... leave well enough alone and forget about those nifty little features (like s///r), update to 5.14.4 and hope for the best, or go all in and update to 5.28.2?
8:30 pm on May 3, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
posts:38246
votes: 108


If you have root on the server, drop in and gzip up the directory for safe keeping. Generally all of perl will be in one directroy.

Then update to new version - if it breaks - unzip it back into the directory and go.

The only weird compatibility problemI have run into is with the last few v5 releases (even broke WebmasterWorld here). They changed how library/current path search works. It used to be you could do:

require "foo.cgi";

and if foo.cgi was in the current working directory (cwd), it was included in the search path and foo.cgi would be found.

Now, you have to push the current directory on to the lib path:

push @INC,'.';

Which should be done at top of every file you are going to 'include' (require or call from module).
1:49 am on May 4, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9734
votes: 929


In most cases you want to run the latest of anything. Perl is a fairly easy install compared to other things ... see ^^^ !
2:35 am on May 4, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1095
votes: 103


A long, long time ago I remember updating either Perl or PHP (I forget which), and afterward I had to go through and modify literally thousands of scripts! And I lost a few hosting clients that were irritated by the down time, they felt like it made me unreliable. So after that, I've been gun shy with updates.
2:38 am on May 4, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9734
votes: 929


Updates sometimes change things. One should vet the change (and update scripts as needed) before rolling out. Perl is a language, and all languages change over time. Usually new functions added, but occasionally a change in old functions also happens.
5:02 am on May 4, 2019 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11688
votes: 206


A long, long time ago I remember updating either Perl or PHP (I forget which), and afterward I had to go through and modify literally thousands of scripts!


PHP4 to PHP5 would have been a headache.
https://www.php.net/ChangeLog-5.php#5.0.0

first release of PHP5 was mid 2004.

PHP4 was discontinued end of 2007 and the last release was mid-2008.
by then PHP5 was in the mid 5.2.X releases.
5:03 am on May 4, 2019 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11688
votes: 206


..., update to 5.14.4 and hope for the best, or go all in and update to 5.28.2?


5.26 is the oldest currently supported version.
that will probably change in the next month or so when 5.30 is likely to be released.

if you upgrade to at least 5.16, you may specify a given version of Perl that you wish to emulate, allowing you to run old scripts that would normally be incompatible.
5:12 am on May 4, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9734
votes: 929


Secondary ... if one upgrades now, changing scripts as necessary, there would be another 10 years of "it ain't broke". :)

Sooner or later change happens. Beauty is one can determine when that change happens. And perhaps get a few new tools in the toolbox along the way.
12:55 pm on May 4, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
posts:38246
votes: 108


I think you want to get into the latest 5.2 version atleast. They changed that directory (lib path search) for a reason (malware) and they never explained why. They only said it had to be done. That made me go 'hmmm', there was something more to it and it was likely a security issue.
6:28 pm on May 4, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1095
votes: 103


PHP4 to PHP5 would have been a headache.

Yep, after reading through... that was it. I upgraded to a new server sometime around 2010 and would have upgraded PHP at the time. I hadn't really been using PHP that long at the time, so there was a HUGE unexpected learning curve!

I really need to upgrade my server within the next few months, anyway, I've just been dragging my feet because it's such a huge pain. But I think I'll go through all of my Perl scripts and add push @INC,'.'; to everything, in the hopes that it will be the only real problem before upgrading. I'm mostly concerned about one client that hasn't updated anything since 2007, I'm worried that the modules I used for him are going to be super outdated and I'll have to end up rebuilding half of his site for free >:-(

5.26 is the oldest currently supported version

I thought that the version they have in bold is always the current stable version?

[cpan.org...]
1:16 am on May 13, 2019 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11688
votes: 206


another thing i remembered being a common perl update problem...

depending on your previously/currently installed version of the DBI module, you may have to change your usage of the connect method:
(see Changes in DBI 1.36, 11th May 2003) [metacpan.org]
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members