in reply to Issue in migration of Perl code from 5.6.1 to 5.8.6

Most likely, when "copying over" things, you didn't catch everything, or you missed a crucial prerequisite that also needs copying over.

"Copying over" is not the way to go about installing CPAN modules, especially not into your stock Perl.

The best way is to compile your own Perl independent from the stock Perl, because the stock Perl is used to run your operating system and does not really belong to you but to the manufacturer of your OS distribution. With your own private Perl, you can use the cpan package tool to install additional modules for your Perl.

If you elect to stay with the stock Perl, I recommend installing the needed modules by using the package manager of your OS, in your case that would be rpm. That way, you can be sure to get the versions that are most likely to be compatible with the rest of your system.

The next best approach is to use the cpan tool to install the missing modules from CPAN into your stock Perl, or possibly using the PREFIX= setting with cpan and ExtUtils::MakeMaker to install the modules into a private directory.

See Yes, even you can use CPAN and A Guide to Installing Modules

Replies are listed 'Best First'.
Re^2: Issue in migration of Perl code from 5.6.1 to 5.8.6
by ja3 (Initiate) on Feb 09, 2009 at 17:39 UTC
    Thanks so much for your prompt response.
    If I understand right, stock perl is the Perl installed with the Linux? Should I then remove whatever I copied and start over?

    I would probably need to stay with the current standard installation (stock?) since that's what will be installed at the customer site and install required modules separately.

    If I want to use package manager to install those modules, where can I find the documentation? Does it also automatically install dependent modules?

    Between package manager and CPAN what approach would be better?How can I ensure that I have installed all the required modules? Thanks

      Yes, what I called "stock perl" is the Perl that comes with your installation of Linux.

      In my opinion, you shouldn't remove whatever you copied, because the risk of you removing too much is high.

      If you plan on running the application with the stock Perl at the customer's site as well, it's good to test it locally first. This still doesn't make it really convenient because the customer might choose to upgrade the OS and then the stock Perl will get upgraded without you getting further notice.

      The package manager of your Linux distribution is documented in the documentation of your Linux distribution. While Perl is widespread and some distribution package managers are written in Perl, Perl has little involvement with Linux distributions and thus does not document Linux distribution package managers. A good package manager automatically includes all dependent modules, but I don't know whether that's the case for RedHat.

      In my first response, I listed the approaches in order of descending quality.

      You can only find out that you have installed all the required modules if your application runs flawlessly.

        Hi, Thanks again! Just in case, if I choose not to go with "stock perl", how can I install my perl? Does that mean have another perl folder containing complete perl installation?If that's true, not sure if I can just download Perl 5.8 version from CPAN... I have a list of files that I copied over in case I want to back them out. At this point, I am a little confused as to what direction I should take...But thanks for your advice.