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

I have a PERL application with a number of modules that I installed (not included with ActiveState distribution). What's the best way to replicate this environment on another Win32 machine without reinstalling everything on that machine? Thanks

Replies are listed 'Best First'.
Re: replicate PERL environment
by Old_Gray_Bear (Bishop) on Oct 28, 2009 at 17:53 UTC
    Take a look at the 'autobundle' command in the CPAN shell. This creates bundle file based on the content of @INC. You can use the resultant file as input to a 'CPAN install' command. This doesn't get completely away from 'reinstalling everything' (because that what it does under the covers), but it reduces that amount of hand waving you have to do.

    According to my copy of Perl In A Nutshell the code looks like this:

    perl -MCPAN -e 'autobundle'
    This writes a file in your $CPAN_HOME/Bundle with a name that contains the date of the run and a disambiguation counter; for example MyBundle_2009_10_28_00.

    You take a copy of the MyBundle file over to your newly built machine, install Perl, issue the command:

    perl-MCPAN -e 'install MyBundle_2009_10_28_00'
    and Bob's Your Uncle.

    ----
    I Go Back to Sleep, Now.

    OGB

      that's very nice! thanks
Re: replicate PERL environment
by marto (Cardinal) on Oct 28, 2009 at 16:12 UTC

    You could use pp to package your application, and all of the modules/libraries you use into an executable for distribution, so that you wouldn't have to install Perl (not PERL) and the modules/libraries used onto any other target systems.

    Martin

      after a LONG installation (via CPAN) which finally failed, my hopes were dashed...pp looks like a dream come true. Any other ideas? It ran through the tests and failed on something about 'gui'.

        This is similar to your "it doesn't work" post. Unless you make the effort to tell us exactly what went wrong, we can't help. As previously advised see How do I post a question effectively?. Tell us which version of Perl you are running (perl -V), show us how you try to install the module, and what output cpan generates.

        Pay attention when posting, various links to help you are displayed below the input box everytime you post.