chanio has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am new at Perl and especially at modules.

My question is the following:

Should I install again all my favourite modules every time that I upgrade Perl in a different folder?

This is my precise problem:

A new Perl version comes with my new upgrade of Apache 2 server for Windows. As it comes all compiled and functional, I just have to rename the previous version. And uncompress the new server that includes a new version of Perl.

But I loose all the modules that I have installed by myself (and thanks to CPAN, obviously).

I was thinking in copying the previous module-files to the new Perl's directory. But I am afraid that modules need something else to get installed as a legal Perl module. Am I right?

I know I am going to find it out somehow, but I am afraid of spending a lot of invaluable time in this profitable process. Any help? Thanks in advance.

Alberto

Replies are listed 'Best First'.
Re: new Perl = install modules again?
by chromatic (Archbishop) on Jun 08, 2003 at 04:29 UTC

    Installing a module can do several things:

    • compile an XS component
    • install documentation
    • install supporting programs
    • update perllocal
    • uninstall old versions of the module
    • run a test suite
    • install autoloadable components

    If the modules are pure-Perl and don't rely on special features that have changed between versions and keep everything necessary in the module files, you can just copy them over into the correct paths. Not all modules are that well-behaved, and some are too complex to work that way.

    It's hard to give you a comprehensive list of which modules can and cannot be copied simply, unfortunately.

Re: new Perl = install modules again?
by chanio (Priest) on Jun 08, 2003 at 04:53 UTC
    Yeah, I found it out at the tutorial for modules:

    http://www.perlmonks.org/index.pl?node_id=260683 in 1/2 an hour of reading...

    First of all, I could install all the modules at another directory outside of my Apache 2 (WAMPP) distro and add the path with a 'use lib my/path/' Perl script statement when it is required before the use module.

    That would do for my case.

    Besides, there is a module called ExtUtils::Installed that can take care of some of these tasks of supervising the modules that should be installed or that might be uninstalled (for some reason).

    These covered all my doubts with new blessings (and I am not thinking of objects :))

    Thanks a lot for 'your misterious ways of' solving my doubts.

    Alberto