Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Upgrading Core Modules Using CPAN - Best Practice?

by mattk (Pilgrim)
on Oct 03, 2008 at 08:19 UTC ( #715159=note: print w/ replies, xml ) Need Help??


in reply to Upgrading Core Modules Using CPAN - Best Practice?

You can configure the CPAN shell to uninstall outdated modules like so:

cpan> o conf mbuild_install_arg UNINST=1
cpan> o conf make_install_arg '--uninst 1'
Or follow the prompts:
cpan> o conf init


Comment on Re: Upgrading Core Modules Using CPAN - Best Practice?
Re^2: Upgrading Core Modules Using CPAN - Best Practice?
by bingos (Vicar) on Oct 03, 2008 at 14:34 UTC

    You appear to have them the wrong way around, it should be:

    cpan> o conf mbuild_install_arg '--uninst 1' cpan> o conf make_install_arg UNINST=1

    Similar settings in CPANPLUS are:

    CPAN Terminal> s conf buildflags uninst=1 CPAN Terminal> s conf makeflags UNINST=1 CPAN Terminal> s save

      This does appear to be a third possible solution, but the CPAN perldoc makes me a little weary about it. Specifically: In fine tuned environments UNINST=1 can cause damage.

      1) I installed a new version of module X but CPAN keeps saying, I hav +e the old version installed Most probably you do have the old version installed. This can happ +en if a module installs itself into a different directory in the @INC + path than it was previously installed. This is not really a CPAN.pm +problem, you would have the same problem when installing the module m +anually. The easiest way to prevent this behaviour is to add the argu +ment UNINST=1 to the make install call, and that is why many people a +dd this argument permanently by configuring o conf make_install_arg UNINST=1 2) So why is UNINST=1 not the default? Because there are people who have their precise expectations about + who may install where in the @INC path and who uses which @INC array +. In fine tuned environments UNINST=1 can cause damage.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715159]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2014-09-21 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls