CPANPLUS
view release on metacpan or search on metacpan
lib/CPANPLUS/Selfupdate.pm view on Meta::CPAN
sub {
my $cb = shift;
$cb->configure_object->get_conf('prefer_makefile')
? { }
: { 'CPANPLUS::Dist::Build' => '0.60' };
},
sub { return 1 }, # always enabled
],
cpantest => [
{ 'Test::Reporter' => '1.34',
'Parse::CPAN::Meta' => '1.4200'
},
sub {
my $cb = shift;
return $cb->configure_object->get_conf('cpantest');
},
],
dist_type => [
sub {
my $cb = shift;
my $dist = $cb->configure_object->get_conf('dist_type');
return { $dist => '0.0' } if $dist;
return;
},
sub {
my $cb = shift;
return $cb->configure_object->get_conf('dist_type');
},
],
md5 => [
{
'Digest::SHA' => '0.0',
},
sub {
my $cb = shift;
return $cb->configure_object->get_conf('md5');
},
],
shell => [
sub {
my $cb = shift;
my $dist = $cb->configure_object->get_conf('shell');
### we bundle these shells, so don't bother having a dep
### on them... If we don't do this, CPAN.pm actually detects
### a recursive dependency and breaks (see #26077).
### This is not an issue for CPANPLUS itself, it handles
### it smartly.
return if $dist eq SHELL_DEFAULT or $dist eq SHELL_CLASSIC;
return { $dist => '0.0' } if $dist;
return;
},
sub { return 1 },
],
signature => [
sub {
my $cb = shift;
return {
'Module::Signature' => '0.06',
} if can_run('gpg');
### leave this out -- Crypt::OpenPGP is fairly
### painful to install, and broken on some platforms
### so we'll just always fall back to gpg. It may
### issue a warning or 2, but that's about it.
### this change due to this ticket: #26914
# and $cb->configure_object->get_conf('prefer_bin');
return {
'Crypt::OpenPGP' => '0.0',
'Module::Signature' => '0.06',
};
},
sub {
my $cb = shift;
return $cb->configure_object->get_conf('signature');
},
],
storable => [
{ 'Storable' => '0.0' },
sub {
my $cb = shift;
return $cb->configure_object->get_conf('storable');
},
],
sqlite_backend => [
{ 'DBIx::Simple' => '0.0',
'DBD::SQLite' => '0.0',
},
sub {
my $cb = shift;
my $conf = $cb->configure_object;
return $conf->get_conf('source_engine')
eq 'CPANPLUS::Internals::Source::SQLite'
},
],
},
core => {
'CPANPLUS' => '0.0',
},
};
sub _get_config { return $Modules }
}
=head1 METHODS
=head2 $self = CPANPLUS::Selfupdate->new( $backend_object );
Sets up a new selfupdate object. Called automatically when
a new backend object is created.
=cut
sub new {
my $class = shift;
my $cb = shift or return;
return bless sub { $cb }, $class;
}
{ ### cache to find the relevant modules
my $cache = {
core
( run in 1.218 second using v1.01-cache-2.11-cpan-df04353d9ac )