Lines Matching defs:CPAN

2 package CPAN::Mirrored::By;
12 package CPAN::FirstTime;
25 CPAN::FirstTime - Utility for CPAN::Config file Initialization
29 CPAN::FirstTime::init()
33 The init routine asks a few questions and writes a CPAN::Config
42 unless ($CPAN::VERSION) {
43 require CPAN::Nox;
45 eval {require CPAN::Config;};
46 $CPAN::Config ||= {};
59 CPAN is the world-wide archive of perl resources. It consists of about
61 Many countries have at least one CPAN site already. The resources
62 found on CPAN are easily accessible with the CPAN.pm module. If you
63 want to use CPAN.pm, you have to configure it properly.
82 $CPAN::Config->{urllist} ||= [];
95 configuration. The CPAN module needs a directory of its own to cache
96 important index files and maybe keep a temporary mirror of CPAN files.
101 my $cpan_home = $CPAN::Config->{cpan_home} || File::Spec->catdir($ENV{HOME}, ".cpan");
107 Shall we use it as the general CPAN build and cache directory?
119 while ($ans = prompt("CPAN build and cache directory?",$default)) {
141 $CPAN::Config->{cpan_home} = $ans;
152 $CPAN::Config->{keep_source_where} = File::Spec->catdir($CPAN::Config->{cpan_home},"sources");
153 $CPAN::Config->{build_dir} = File::Spec->catdir($CPAN::Config->{cpan_home},"build");
166 $default = $CPAN::Config->{build_cache} || 10;
168 $CPAN::Config->{build_cache} = $ans;
171 $CPAN::Config->{'index_expire'} = 1;
175 By default, each time the CPAN module is started, cache scanning
181 $default = $CPAN::Config->{scan_cache} || 'atstart';
185 $CPAN::Config->{scan_cache} = $ans;
192 To considerably speed up the initial CPAN shell startup, it is
198 defined($default = $CPAN::Config->{cache_metadata}) or $default = 1;
202 $CPAN::Config->{cache_metadata} = ($ans =~ /^\s*y/i ? 1 : 0);
210 general CPAN is English speaking territory, thus the charset does not
212 software to CPAN bear names that are outside the ASCII range. If your
221 defined($default = $CPAN::Config->{term_is_latin}) or $default = 1;
226 $CPAN::Config->{term_is_latin} = ($ans =~ /^\s*y/i ? 1 : 0);
234 Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
241 defined($default = $CPAN::Config->{histfile}) or
242 $default = File::Spec->catfile($CPAN::Config->{cpan_home},"histfile");
246 $CPAN::Config->{histfile} = $ans;
248 if ($CPAN::Config->{histfile}) {
249 defined($default = $CPAN::Config->{histsize}) or $default = 100;
251 $CPAN::Config->{histsize} = $ans;
260 The CPAN module can detect when a module that which you are trying to
268 $default = $CPAN::Config->{prerequisites_policy} || 'ask';
274 $CPAN::Config->{prerequisites_policy} = $ans;
282 The CPAN module will need a few external programs to work properly.
297 $CPAN::Config->{$progname} = 'not_here';
302 next if $progname eq "ncftp" && $CPAN::Config->{ncftpget} gt " ";
303 my $path = $CPAN::Config->{$progname}
324 $CPAN::Config->{$progname} = $ans;
326 my $path = $CPAN::Config->{'pager'} ||
331 $CPAN::Config->{'pager'} = $ans;
332 $path = $CPAN::Config->{'shell'};
339 $CPAN::Config->{'shell'} = 'not_here';
343 $CPAN::Config->{'shell'} = $ans;
361 $default = $CPAN::Config->{makepl_arg} || "";
362 $CPAN::Config->{makepl_arg} =
369 $default = $CPAN::Config->{make_arg} || "";
370 $CPAN::Config->{make_arg} = prompt("Parameters for the 'make' command?
377 $default = $CPAN::Config->{make_install_arg} || $CPAN::Config->{make_arg} || "";
378 $CPAN::Config->{make_install_arg} =
392 Sometimes you may wish to leave the processes run by CPAN alone
402 $default = $CPAN::Config->{inactivity_timeout} || 0;
403 $CPAN::Config->{inactivity_timeout} =
411 CPAN configuration or via environment variables. The variable in
412 the \$CPAN::Config takes precedence.
417 $default = $CPAN::Config->{$_} || $ENV{$_};
418 $CPAN::Config->{$_} = prompt("Your $_?",$default);
421 if ($CPAN::Config->{ftp_proxy} ||
422 $CPAN::Config->{http_proxy}) {
423 $default = $CPAN::Config->{proxy_user} || $CPAN::LWP::UserAgent::USER;
431 if ($CPAN::Config->{proxy_user} = prompt("Your proxy user id?",$default)) {
441 if ($CPAN::META->has_inst("Term::ReadKey")) {
451 $CPAN::Config->{proxy_pass} = prompt("Your proxy password?");
452 if ($CPAN::META->has_inst("Term::ReadKey")) {
455 $CPAN::Frontend->myprint("\n\n");
466 $CPAN::Config->{'inhibit_startup_message'} = 0;
467 $CPAN::Config->{'getcwd'} = 'cwd';
470 CPAN::Config->commit($configpm);
475 my $mby = File::Spec->catfile($CPAN::Config->{keep_source_where},$m);
488 I\'d use that as a database of CPAN sites. If that is OK for you,
500 $mby = CPAN::FTP->localize($m,$mby,3);
506 $mby = CPAN::FTP->localize($m,$mby,3);
511 $mby = CPAN::FTP->localize($m,$mby,3);
517 $mby = CPAN::FTP->localize($m,$mby,3);
605 $all{$continent}{$country}{$dst} = CPAN::Mirrored::By->new($continent,$country,$dst);
610 $CPAN::Config->{urllist} ||= [];
612 if (@previous_urls = @{$CPAN::Config->{urllist}}) {
613 $CPAN::Config->{urllist} = [];
618 Now we need to know where your favorite CPAN sites are located. Push
620 work). If you are mirroring CPAN to your local workstation, specify a
626 of CPAN mirrors in the countries you selected, along with previously
629 http: -- that host a CPAN mirror.
658 # hmmm, should take list of defaults from CPAN::Config->{'urllist'}...
679 push @{$CPAN::Config->{urllist}}, @urls;
683 my %seen = map (($_ => 1), @{$CPAN::Config->{urllist}});
688 $prompt = qq{CPAN.pm needs at least one URL where it can fetch CPAN files from.
690 Please enter your CPAN site:};
707 $INC{'CPAN/MyConfig.pm'} || $INC{'CPAN/Config.pm'} || "configuration file",
713 push @{$CPAN::Config->{urllist}}, @urls;
716 map { print " $_\n" } @{$CPAN::Config->{urllist}};