Working on legacy code

2016-11-16 10:30:36 admin Perl Interests 0 Comments

It’s hard, difficult and at times even downright horrible. Badly written Perl legacy code is a scary monster that can make developers change programming languages and unfortunately there are quite a few situations when this happened. Legacy code has a somewhat dark and dreadful tone to it. When you think there’s more than one way to do it you get excited at the freedom that it offers. On the other hand when you think that you have to maintain something written a few years ago, or a decade ago, by the principle there’s more than one way to do it, you can get some shivers down your spine.

As we pointed out in several previous articles, the future of Perl relies a lot on the new generation of programmers. They will have to take on the gauntlet of Perl and to a degree, they will have to maintain one day, your legacy code, just like you’re probably doing right now for someone else. Here are a few reasons why legacy code can be a pain in the a..: (feel free to add more)

  • Reading someone else's code without any helpful hints (i.e. comments) is like reading a novel in a foreign languages without a dictionary

  • Analysing non objectual code is time consuming and mind boggling

  • Expired or not maintained CPAN modules can bring the world crushing down on your head

  • The different versions of Perl (5) are not always compatible, so Perl code written in the late 90’ won’t necessarily match your current code

  • CGI code for the web

  • Old apps that don’t work with Catalyst

  • Programming techniques that won’t work in 2016

These reasons and not just are a barrier for programmers who are getting started in Perl. These are real problems that can pop up for any developer, beginner or senior. But maintaining legacy code shouldn’t be such a scary monster, it’s a situation that exists in every language, not just in Perl, but in our case it seems to be more difficult or at least give the illusion of difficulty.

How do you deal with legacy code in Perl? What issues and solutions have you run into?

Leave a comment


0 Comments

Subscribe to our newsletter!

Make sure you never miss the interesting stories of Perl startups, apps and projects.