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

Without perlbrew, perl installation switch in win32 is a Minotaur to me. I've been sticking to 5.10.1 for years, building ,testing all around it and hope that the day of upgrading never come.

But life can't be always smooth. Recently I have to upgrade my perl to 5.16/5.18(yes, it's you! who make your modules require 5.16+! you ruin my life! ;) ) Before I start to test all modules manually.(nightmare!) I'd like to ask monks here:

is there a safe/standard/smart way to detect, build, test, and switch all modles from low version perl to the high on in Windows ?

Thanks in advance


Many many thanks monks replied!! I did some work with your help in couple of days, and think the final solution is portable strawberry perl + cpanm/ExtUtils::Installed. Portable strawberry perl provides a very handy tool portableshell.bat to let user switch various perl in machine.

And next step is using cpanm or other modules(ExtUtils::Installed) like it to list all modules installed and install to the new directory.

I've now installed 5.16.3 strawberry perl and doing all tests on it. Thanks again for your generous help! hope the author of perlbrew could consider supporting windows platform in next version.

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: tool for managing perl in win32
by daxim (Curate) on Jul 31, 2013 at 14:16 UTC
Re: tool for managing perl in win32
by glasswalk3r (Friar) on Jul 31, 2013 at 15:29 UTC

    Maybe you could create a bundle for all non-core modules that you have installed for for perl 5.10 and try to use perlbrew to install the new version (but I'm almost sure perlbrew works only in Unix-like OS).

    If perlbrew cannot help, you could go with a VM, install the newest perl and try to install your bundle by using CPAN, running all tests available during setup.

    Alceu Rodrigues de Freitas Junior
    "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
Re: tool for managing perl in win32
by ig (Vicar) on Aug 01, 2013 at 03:10 UTC

    You don't say what release of perl you use or how you installed your modules or how you will install modules on your new version of perl. These details may make a difference to what you can do.

    I use Strawberry perl and install additional modules with cpan. To re-install all currently installed modules after installing a new version of perl I would use the cpan -a command from the old version of perl to create a bundle listing all currently installed modules then install this bundle from the new version of perl.

    I rarely do this. Over time the set of modules installed on my system grows as I try various new ones. I generally only use a small subset of these on an ongoing basis. When I install a new version of perl, I usually only install additional modules as needed.

Re: tool for managing perl in win32
by BrowserUk (Pope) on Aug 01, 2013 at 03:31 UTC

    If you use active state and all or most of your packages were installed using ppm (or ppm-shell) then you can create a list of all your installed packaged usiing:

    ppm profile save [ *filename* ] Write profile of configured repositories and installed packages to the given file. If no file is given then print the profile XML to standard output.

    And then (try) install them into your new installation using:

    ppm profile restore [ *filename* ] Install the packages listed in the given profile file. If no file +is given try to read the profile from standard input.

    Which would be great if a) all the packages we needed were available as PPDs and if all the packages for which PPDs are were once available for 5.10.1 were also available for the newer versions; b) if the restore didn't stop every time it encounters a package that isn't available; C) if the profile mechanism would handle non-AS repositories.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: tool for managing perl in win32 (PATH/PERLLIB/INSTALL_BASE)
by Anonymous Monk on Aug 01, 2013 at 07:56 UTC
Re: tool for managing perl in win32
by rpnoble419 (Pilgrim) on Aug 01, 2013 at 20:25 UTC

    I have five different Perls on my windows box (I like strawberry so I have 4 versions of that and one Active State for running PerlApp) for testing and application distribution. I use .bat files to manage the various settings that need to be adjusted and this works very well for me. Like IG I also have a large number of modules I "play" with over time. What I do is use my programming IDE to scan all of my active perl code and make a list of my "use" statements and then I know what modules I "need" to test first when moving to a new version of perl. I support five active products and this process takes me about 30 minutes to.