in reply to migrate perl program

Try to put together a list of Perl modules in use, this would help greatly in understanding what kind of problems you might run into.

You could try to collect some data on this automatically, for example by using grep. My grep-fu isn't very strong but it should atleast help you get started:

grep -r "^use [0-9a-zA-Z\:]*;" /home/*

Also, I've found that well-written perl code usually survives longer. No "use strict/use warnings"? Lots of global variables? No SQL placeholders? Manual extraction of form parameters as opposed to using the CGI module? These are usually signs that the migration is going to take a while. Not necessarily because more things break, but because poorly written code can be notoriously hard to troubleshoot and you end up having to rewrite a lot of code that deserved to die.

I know this all too well, because I've just spent two days migrating my own private web server with scripts dating back to last century. It was even worse than I feared :-P

-- FloydATC

Time flies when you don't know what you're doing

Replies are listed 'Best First'.
Re^2: migrate perl program
by gehu (Initiate) on Dec 02, 2014 at 17:08 UTC

    thanks for your responses, but my scripts are simple, long but simple, a lot a scripts for transfer FTP. The modules which frighten me, are perl-Net-SSLeay-1.30-4.EL3, perl-Crypt-SSLeay-0.51-4, perl-DBI-1.32-9. I don't use strict/warnings in my scripts. I've been reassured by your analyses, I am going to launch the first tests. i've got a feetback.

      So a really good first step would be to add strictures to your code before you port it and clean up any issues raised on the old system. If possible it would also be smart to add some regression tests so you can have some confidence behavior hasn't changed in important places during the migration. Also run through checking that system calls are checked for errors and handled correctly - if you are moving to a new system filed and directories may have moved around in surprising ways and file operations may begin failing as a result.

      Perl is the programming world's equivalent of English