[Israel.pm] Perl version migration

Gabor Szabo gabor at pti.co.il
Sun May 2 06:37:52 PDT 2004


On Sun, 2 May 2004, Jason Elbaum wrote:

> So is it *ever* possible to get out of this trap? Or will we be stuck
> forever with default perl at version 5.004, and new versions selected
> explicitly by the name of the perl executable?

I guess once in a while you do change operating system or parts of it,
don't you ? How do you test that everything including shell scripts
and perl scripts keep working after the upgrade ?

In such case you'll have to test all your scripts so you'll be
reasonably confident that your scripts run correctly.
Probably you don't like the idea of doing it manually, do you ?

I saw two approaches in other places with lots of legacy perl code.
Either they just give up ever improving their life and they constantly
try to find people whom could be hired to look at such age old code before
suffering irreversible brain damage

OR

they gradually update their code to fit better programming practices
and to use newer perl versions. In this work they usually throw out
most of their code as they find modules on CPAN that do just what they
wanted. On the other hand they add automatic tests and documentation so
their bosses won't feel bad that the files got smaller.


Whenever they need to touch one script they take the time to write
tests first, then make sure it works with the newer versions.
Once in a while they also pick up scripts that don't need an immediate
change but still they clean it to be prepared for a later urgent change.

This can be a lot of work of course but instead of dragging legacy code
that noone understands any more they gradually get modern script that
they can expand and reuse a lot easier than the original code.

When I suggest this usually the response is

              "Don't fix what is not broken!".

Which is a very healthy approach. It can be translated to:

            "Let's wait till disaster occurs!"

"Then lose lots of production hours till we find the solution in a
code that noone understands any more."

And here is a link (I found Goggling perl legacy code) that
points to a chapter of the new Perl Medic: book:
http://www.webreference.com/programming/awperl/


BTW When did this

> Freescale Semiconductor Israel (formerly Motorola Semiconductor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

happen ?


Gabor




More information about the Perl mailing list