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

Hi All,

I have installed so many packages so far in my system "perl" folder also I have customized some of them for my purposes.

Now I need to format and reinstall my OS for some problems.

Its a tedious job to check all the packages and reinstall all of them after my OS has been reinstalled. In order to avoid that, I am going to bakup the "perl" folder and copy back in the newly installed OS.

Is it a workable solution? or anything I have to do more than that? Please help me to solve this problem

Regards,

Srikrishnan

Replies are listed 'Best First'.
Re: bakup and copy of perl folder
by ig (Vicar) on Aug 31, 2009 at 09:13 UTC

    If you will be re-installing the same version of perl as you are currently running, then backup and restore of the perl library may work.

    You should re-install perl itself so its libraries are registered, file associations are set up, etc. If any of the packages you have installed are not pure perl then you may have to re-install them also, or otherwise reproduce whatever was setup at install time other than the files in the perl directory (registering dlls, file associations or whatever).

    If you will be installing a different version of perl then the risk of faults will be greater, particularly if you have installed packages that are not pure perl.

Re: bakup and copy of perl folder
by Utilitarian (Vicar) on Aug 31, 2009 at 06:00 UTC
    Sounds as though you're on a Unix of some kind, no mention of reinstalling Perl.

    Copy back $HOME/.cpan as well.

      Sorry,

      I am using "Windows XP"

      Regards,

      Srikrishnan
Re: bakup and copy of perl folder
by Anonymous Monk on Aug 31, 2009 at 06:46 UTC
    Don't forget to copy registry entries if any exist (like perl/activeperl ...)
Re: bakup and copy of perl folder
by bichonfrise74 (Vicar) on Aug 31, 2009 at 19:04 UTC
    As tedious as it might sound, if I were you, I would just get all the packages and reinstall all of them in your new OS. This would prevent any problems in the future.

    Consider what happens when you copy the packages to your new OS and you think that everything is 'okay'. When you write your new script and it is dependent on these 'copied' modules, and it breaks. You will always have this at the back of your mind whether the script broke because of the 'copied' modules.