Re: Updating installed modules?



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
.



Relevant Pages

  • Re: Updating installed modules?
    ... checking for updates and then manually reinstalling. ... Thanks - it did the trick. ... Is there a 'flag' I can use to accept all the ... although this cancels installation if it's waiting ...
    (comp.lang.perl.modules)
  • Re: Qs on CLEARTYPE_QUALITY
    ... the CLEARTYPE_QUALITY flag has no effect on ... The general solution for this sort of problem is to call GetVersionEx at ... just don't do it for printer DCs. ...
    (microsoft.public.win32.programmer.gdi)