CPANPLUS
view release on metacpan or search on metacpan
lib/CPANPLUS/Configure/Setup.pm view on Meta::CPAN
Would you like to do this?
");
my $type = 'source_engine';
my $class = 'CPANPLUS::Internals::Source::SQLite';
my $yn = $term->ask_yn(
prompt => loc("Use SQLite?"),
default => $conf->get_conf( $type ) eq $class ? 1 : 0,
);
print "\n";
print $yn
? loc("I will use SQLite")
: loc("I will not use SQLite");
$conf->set_conf( $type => $class );
}
{
###################
## use cpantest? ##
###################
print loc("
CPANPLUS has support for the Test::Reporter module, which can be utilized
to report success and failures of modules installed by CPANPLUS. Would
you like to do this? Note that you will still be prompted before
sending each report.
If you don't have all the required modules installed yet, you should
consider installing '%1'
This package bundles all the required modules to enable test reporting
and querying from CPANPLUS.
You can do so straight after this installation.
", 'Bundle::CPANPLUS::Test::Reporter');
my $type = 'cpantest';
my $yn = $term->ask_yn(
prompt => loc('Report test results?'),
default => $conf->get_conf( $type ) ? 1 : 0,
);
print "\n";
print $yn
? loc("I will prompt you to report test results")
: loc("I won't prompt you to report test results");
$conf->set_conf( $type => $yn );
}
{
###################################
## use cryptographic signatures? ##
###################################
print loc("
The Module::Signature extension allows CPAN authors to sign their
distributions using PGP signatures. Would you like to check for
module's cryptographic integrity before attempting to install them?
Note that this requires either the 'gpg' utility or Crypt::OpenPGP
to be installed.
");
my $type = 'signature';
my $yn = $term->ask_yn(
prompt => loc('Shall I check module signatures?'),
default => $conf->get_conf($type) ? 1 : 0,
);
print "\n";
print $yn
? loc("Ok, I will attempt to check module signatures.")
: loc("Ok, I won't attempt to check module signatures.");
$conf->set_conf( $type => $yn );
}
return 1;
}
sub _setup_hosts {
my $self = shift;
my $term = $self->term;
my $conf = $self->configure_object;
if( scalar @{ $conf->get_conf('hosts') } ) {
my $hosts;
for my $href ( @{$conf->get_conf('hosts')} ) {
$hosts .= "\t$href->{scheme}://$href->{host}$href->{path}\n";
}
print loc("
I see you already have some hosts selected:
$hosts
If you'd like to stick with your current settings, just select 'Yes'.
Otherwise, select 'No' and you can reconfigure your hosts
");
my $yn = $term->ask_yn(
prompt => loc("Would you like to keep your current hosts?"),
default => 'y',
);
return 1 if $yn;
}
my @hosts;
MAIN: {
print loc("
Now we need to know where your favorite CPAN sites are located. Make a
list of a few sites (just in case the first on the array won't work).
If you are mirroring CPAN to your local workstation, specify a file:
URI by picking the CUSTOM option.
( run in 0.869 second using v1.01-cache-2.11-cpan-df04353d9ac )