Re: Updating installed modules?
- From: Steffen Netz <SteffenNetz@xxxxxxxxxx>
- Date: Thu, 29 Jun 2006 09:39:04 +0200
Andy Hassall wrote:
Andy Hassall wrote:
On Fri, 23 Jun 2006 07:36:45 GMT, Jim Ford <jaford@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Is there a way to update installed modules? Cpan only seems to offer
checking for updates and then manually reinstalling.
http://search.cpan.org/~andk/CPAN-1.87/lib/CPAN.pm#Programmer%27s_interface
perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
Thanks - it did the trick. Is there a 'flag' I can use to accept all the
default 'yesess and nos'? I had a lot of moldules that needed updating
and I had to keep checking to see if a response was required from me.
There's inactivity_timeout, although this cancels installation if it's waiting
for input, so that's not really what you want.
I can't remember off the top of my head whether it accepts defaults, cancels,
or hangs when the process doesn't have a terminal, e.g. it's being run under
cron.
Hi,
I had have a similar question not long ago.
I think there are some questions:
- interactive installation ( see OP)
- Wrong Version-Numbers ( I had some with GD Package says locally
1.0 everytime)
- Depencies :
Template::Stash::XS object version 2.15 does not match bootstrap
parameter 2.14
at /sw/opensrc/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm line 249.
- ???
Could there be a general solution?
My solution so far:
use CPANPLUS::Backend;
my $cb = CPANPLUS::Backend->new( );
my @modules = $cb->installed();
foreach $mod (@modules) {
if ( !$mod->is_uptodate() && !$mod->package_is_perl_core()) {
print "Update :" , $mod->name(), "\t" , $mod->installed_version() ,"-" , $mod->version() ,"\n";
$mod->install();
}
}
regards,
Steffen
.
- References:
- Updating installed modules?
- From: Jim Ford
- Re: Updating installed modules?
- From: Andy Hassall
- Re: Updating installed modules?
- From: Jim Ford
- Re: Updating installed modules?
- From: Andy Hassall
- Updating installed modules?
- Prev by Date: Re: Transition of CPAN to Perl6 ?
- Next by Date: Re: Transition of CPAN to Perl6 ?
- Previous by thread: Re: Updating installed modules?
- Next by thread: FreeDB lookup error with Audio::CD
- Index(es):
Relevant Pages
|
|