Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

re-install modules

by pgmer6809 (Initiate)
on Jun 03, 2014 at 19:09 UTC ( #1088490=perlquestion: print w/replies, xml ) Need Help??
pgmer6809 has asked for the wisdom of the Perl Monks concerning the following question:

I run a flavor of Ubuntu (Mint). I have several perl modules that I installed 'manually' with CPAN (I don't know which ones). I am about to upgrade to the next LTS and need to know which Perl modules I will need to re-install, and which ones come with Perl and that I should not re-install for fear of breaking the new perl config. Is there a way of telling which Perl modules are 'extra' and which are 'default'? Does -MCPAN have a directory path that it uses by default? Thanks, pgmer6809

Replies are listed 'Best First'.
Re: re-install modules
by LanX (Bishop) on Jun 03, 2014 at 19:49 UTC
    corelist can list all modules which came with core.

    And I suppose that manually installed modules have another @INC path, but your settings may vary.

    Cheers Rolf

    (addicted to the Perl Programming Language)

Re: re-install modules
by tobyink (Abbot) on Jun 03, 2014 at 20:24 UTC

    ExtUtils::Installed looks like a good place to start. From the documentation:

    ExtUtils::Installed provides a standard way to find out what core and module files have been installed. It uses the information stored in .packlist files created during installation to provide this information. In addition it provides facilities to classify the installed files and to extract directory information from the .packlist files.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re: re-install modules
by InfiniteSilence (Curate) on Jun 03, 2014 at 19:36 UTC

    I got this one-liner from here

    perl MFile::Find=find -MFile::Spec::Functions -e 'find {wanted=>sub{p +rint canonpath $_ if /\.pm\z/}, no_chdir =>1}, @INC;'

    And one way to do this is to run this on your target, vanilla installed instance and compare the output of your existing, modified system for differences.

    Celebrate Intellectual Diversity

Re: re-install modules
by taint (Chaplain) on Jun 03, 2014 at 19:44 UTC
    Greetings, pgmer6809.

    Prior to your upgrade, you might want to get, and install HTML::Perlinfo. Then create the following, and open it in your web browser (other possibilities exist for the CLI)

    #!/usr/bin/perl -T use HTML::Perlinfo; use strict; print "Content-type: text/html\n\n"; perlinfo();

    This will give you a wealth of information, regarding your current Perl installation. Not the least of which, are all the Modules you currently have installed. Think of it, as Taking Inventory. :)

    BEWARE do delete the script I provided above, after you've used it. Because you DO NOT want others to have access to this information. :)

    Best wishes.

    --Chris

    λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Re: re-install modules
by wjw (Priest) on Jun 04, 2014 at 01:33 UTC

    Another option:

    PerlBrew, and I would strongly suggest it. It is easy to install/set up, and if your LTS upgrade does not destroy your $HOME dir, you are in the same spot with Perl as you were before the upgrade with the exception of the ditro's Perl, which you probably won't use much any more anyway. If the LTS does destroy $HOME, just back up $HOME prior to upgrade, which would be a good idea anyway.

    Hope you find that helpful....

    ...the majority is always wrong, and always the last to know about it...

    Insanity: Doing the same thing over and over again and expecting different results...

    A solution is nothing more than a clearly stated problem...otherwise, the problem is not a problem, it is a facct

Re: re-install modules
by Anonymous Monk on Jun 04, 2014 at 00:14 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1088490]
Approved by LanX
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2018-01-18 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (213 votes). Check out past polls.

    Notices?