Updating installed modules?
am 23.06.2006 09:36:45 von Jim FordIs there a way to update installed modules? Cpan only seems to offer
checking for updates and then manually reinstalling.
Jim Ford
Is there a way to update installed modules? Cpan only seems to offer
checking for updates and then manually reinstalling.
Jim Ford
On Fri, 23 Jun 2006 07:36:45 GMT, Jim Ford
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#Programme r%27s_interface
perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Andy Hassall wrote:
> On Fri, 23 Jun 2006 07:36:45 GMT, Jim Ford
> 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#Programme r%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.
Jim Ford
On Wed, 28 Jun 2006 09:25:57 GMT, Jim Ford
wrote:
>Andy Hassall wrote:
>> On Fri, 23 Jun 2006 07:36:45 GMT, Jim Ford
>> 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#Programme r%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.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Andy Hassall wrote:
> >Andy Hassall wrote:
> >> On Fri, 23 Jun 2006 07:36:45 GMT, Jim Ford
> >> 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#Programme r%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