Lines Matching defs:CPAN

2 package CPAN;
5 # $Id: CPAN.pm,v 1.412 2003/07/31 14:53:04 k Exp $
34 %CPAN::DEBUG = qw[
35 CPAN 1
53 $CPAN::DEBUG ||= 0;
54 $CPAN::Signal ||= 0;
55 $CPAN::Frontend ||= "CPAN::Shell";
56 $CPAN::Defaultsite ||= "ftp://ftp.perl.org/pub/CPAN";
58 package CPAN;
65 @CPAN::ISA = qw(CPAN::Debug Exporter);
72 #-> sub CPAN::AUTOLOAD ;
78 CPAN::Config->load unless $CPAN::Config_loaded++;
80 CPAN::Shell->$l(@_);
82 $CPAN::Frontend->mywarn(qq{Unknown command "$AUTOLOAD". }.
88 #-> sub CPAN::shell ;
92 CPAN::Config->load unless $CPAN::Config_loaded++;
105 $term = Term::ReadLine->new('CPAN Monitor');
110 &CPAN::Complete::gnu_cpl;
114 $readline::rl_completion_function = 'CPAN::Complete::cpl';
116 if (my $histfile = $CPAN::Config->{'histfile'}) {{
118 $CPAN::Frontend->mywarn("Terminal does not support AddHistory.\n");
140 my $cwd = CPAN::anycwd();
145 "available (try 'install Bundle::CPAN')";
147 $CPAN::Frontend->myprint(
149 cpan shell -- CPAN exploration and modules installation (v%s%s)
153 $CPAN::VERSION,
154 $CPAN::Revision,
157 unless $CPAN::Config->{'inhibit_startup_message'} ;
181 package CPAN::Eval;
183 CPAN->import(':DEFAULT') unless $import_done++;
184 CPAN->debug("eval[$eval]") if $CPAN::DEBUG;
199 $CPAN::META->debug("line[".join("|",@line)."]") if $CPAN::DEBUG;
201 eval { CPAN::Shell->$command(@line) };
203 chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!});
204 $CPAN::Frontend->myprint("\n");
213 CPAN::Queue->nullify_queue;
215 if ($CPAN::META->has_inst("Term::ReadLine::Gnu")
217 $CPAN::META->has_inst("Term::ReadLine::Perl")
221 local($SIG{__WARN__}) = CPAN::Shell::paintdots_onreload(\$redef);
223 $CPAN::Frontend->myprint("\n$redef subroutines in ".
230 chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!});
233 package CPAN::CacheMgr;
234 @CPAN::CacheMgr::ISA = qw(CPAN::InfoObj CPAN);
237 package CPAN::Config;
246 package CPAN::FTP;
248 @CPAN::FTP::ISA = qw(CPAN::Debug);
250 package CPAN::LWP::UserAgent;
254 package CPAN::Complete;
255 @CPAN::Complete::ISA = qw(CPAN::Debug);
256 @CPAN::Complete::COMMANDS = sort qw(
260 ) unless @CPAN::Complete::COMMANDS;
262 package CPAN::Index;
264 @CPAN::Index::ISA = qw(CPAN::Debug);
270 package CPAN::InfoObj;
271 @CPAN::InfoObj::ISA = qw(CPAN::Debug);
273 package CPAN::Author;
274 @CPAN::Author::ISA = qw(CPAN::InfoObj);
276 package CPAN::Distribution;
277 @CPAN::Distribution::ISA = qw(CPAN::InfoObj);
279 package CPAN::Bundle;
280 @CPAN::Bundle::ISA = qw(CPAN::Module);
282 package CPAN::Module;
283 @CPAN::Module::ISA = qw(CPAN::InfoObj);
285 package CPAN::Exception::RecursiveDependency;
307 package CPAN::Shell;
309 @CPAN::Shell::ISA = qw(CPAN::Debug);
313 #-> sub CPAN::Shell::AUTOLOAD ;
320 if ($CPAN::META->has_inst('CPAN::WAIT')) {
321 CPAN::WAIT->$autoload(@_);
323 $CPAN::Frontend->mywarn(qq{
324 Commands starting with "w" require CPAN::WAIT to be installed.
325 Please consider installing CPAN::WAIT to use the fulltext index.
327 install CPAN::WAIT
331 $CPAN::Frontend->mywarn(qq{Unknown command '$autoload'. }.
337 package CPAN::Tarzip;
339 @CPAN::Tarzip::ISA = qw(CPAN::Debug);
342 package CPAN::Queue;
345 # announce the availability of a new CPAN module
349 # easily be reached by running CPAN.pm recursively, but we don't want
353 # CPAN::Queue is the package where the queue is maintained. Dependencies
386 # in CPAN::Distribution::rematein.
391 # CPAN::Queue::new ;
399 # CPAN::Queue::first ;
405 # CPAN::Queue::delete_first ;
417 # CPAN::Queue::jumpqueue ;
421 CPAN->debug(sprintf("before jumpqueue All[%s] what[%s]",
424 )) if $CPAN::DEBUG;
428 CPAN->debug("i[$All[$i]]what[$what]") if $CPAN::DEBUG;
434 $CPAN::Frontend->mywarn(
444 CPAN->debug(sprintf("after jumpqueue All[%s] what[%s]",
447 )) if $CPAN::DEBUG;
450 # CPAN::Queue::exists ;
459 # CPAN::Queue::delete ;
465 # CPAN::Queue::nullify_queue ;
472 package CPAN;
474 $META ||= CPAN->new; # In case we re-eval ourselves we need the ||
479 #-> sub CPAN::all_objects ;
482 CPAN::Config->load unless $CPAN::Config_loaded++;
483 CPAN->debug("mgr[$mgr] class[$class]") if $CPAN::DEBUG;
484 CPAN::Index->reload;
494 #-> sub CPAN::checklock ;
497 my $lockfile = File::Spec->catfile($CPAN::Config->{cpan_home},".lock");
500 $CPAN::Frontend->mydie("Could not open $lockfile: $!");
514 $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: Lockfile $lockfile\n".
520 $CPAN::Frontend->mywarn(
522 There seems to be running another CPAN process (pid $otherpid). Contacting...
525 $CPAN::Frontend->mydie(qq{Other job is running.
535 $CPAN::Frontend->myexit("Ok, bye\n")
547 $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: Lockfile $lockfile\n".
552 my $dotcpan = $CPAN::Config->{cpan_home};
566 $CPAN::Frontend->mywarn(qq{
574 CPAN.pm working directory. I could not create this directory due
583 $CPAN::Frontend->mydie($diemess);
589 my $incc = $INC{'CPAN/Config.pm'};
590 my $myincc = File::Spec->catfile($ENV{HOME},'.cpan','CPAN','MyConfig.pm');
591 $CPAN::Frontend->myprint(qq{
593 Your configuration suggests that CPAN.pm should use a working
595 $CPAN::Config->{cpan_home}
601 \$CPAN::Config->{cpan_home}
610 $CPAN::Frontend->mydie("Could not open >$lockfile: $!");
618 $CPAN::Frontend->mydie("Got SIGTERM, leaving");
623 $CPAN::Frontend->mydie("Got another SIGINT") if $Signal;
650 $self->debug("Signal handler set.") if $CPAN::DEBUG;
653 #-> sub CPAN::DESTROY ;
658 #-> sub CPAN::anycwd ;
661 $getcwd = $CPAN::Config->{'getcwd'} || 'cwd';
662 CPAN->$getcwd();
665 #-> sub CPAN::cwd ;
668 #-> sub CPAN::getcwd ;
671 #-> sub CPAN::exists ;
674 CPAN::Config->load unless $CPAN::Config_loaded++;
675 CPAN::Index->reload;
682 #-> sub CPAN::delete ;
689 #-> sub CPAN::has_usable
725 #-> sub CPAN::has_inst
728 Carp::croak("CPAN->has_inst() called without an argument")
732 exists $CPAN::META->{dontload_hash}{$mod} # unsafe meta access, ok
734 exists $CPAN::Config->{dontload_hash}{$mod}
736 $CPAN::META->{dontload_hash}{$mod}||=1; # unsafe meta access, ok
757 $CPAN::Frontend->myprint("CPAN: $mod loaded ok\n");
758 if ($mod eq "CPAN::WAIT") {
759 push @CPAN::Shell::ISA, CPAN::WAIT;
763 $CPAN::Frontend->mywarn(qq{
764 Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
771 $CPAN::Frontend->myprint(qq{
772 CPAN: MD5 security checks disabled because Digest::MD5 not installed.
783 #-> sub CPAN::instance ;
786 CPAN::Index->reload;
793 #-> sub CPAN::new ;
798 #-> sub CPAN::cleanup ;
817 $CPAN::Frontend->mywarn("Lockfile removed.\n");
820 #-> sub CPAN::savehist
824 unless ($histfile = $CPAN::Config->{'histfile'}){
825 $CPAN::Frontend->mywarn("No history written (no histfile specified).\n");
828 $histsize = $CPAN::Config->{'histsize'} || 100;
829 if ($CPAN::term){
830 unless ($CPAN::term->can("GetHistory")) {
831 $CPAN::Frontend->mywarn("Terminal does not support GetHistory.\n");
837 my @h = $CPAN::term->GetHistory;
840 open $fh, ">$histfile" or $CPAN::Frontend->mydie("Couldn't open >$histfile: $!");
865 $CPAN::Frontend->myprint("Prepending @dirs to PERL5LIB.\n");
869 package CPAN::CacheMgr;
871 #-> sub CPAN::CacheMgr::as_string ;
881 #-> sub CPAN::CacheMgr::cachesize ;
886 #-> sub CPAN::CacheMgr::tidyup ;
892 $CPAN::Frontend->myprint(sprintf(
897 return if $CPAN::Signal;
899 return if $CPAN::Signal;
903 #-> sub CPAN::CacheMgr::dir ;
908 #-> sub CPAN::CacheMgr::entries ;
912 $self->debug("reading dir[$dir]") if $CPAN::DEBUG;
914 my($cwd) = CPAN::anycwd();
926 $CPAN::Frontend->mywarn("Warning: weird direntry in $dir: $_\n");
933 #-> sub CPAN::CacheMgr::disk_usage ;
937 return if $CPAN::Signal;
941 $File::Find::prune++ if $CPAN::Signal;
953 return if $CPAN::Signal;
956 $self->debug("measured $dir is $Du") if $CPAN::DEBUG;
961 #-> sub CPAN::CacheMgr::force_clean_cache ;
966 if $CPAN::DEBUG;
972 #-> sub CPAN::CacheMgr::new ;
979 ID => $CPAN::Config->{'build_dir'},
980 MAX => $CPAN::Config->{'build_cache'},
981 SCAN => $CPAN::Config->{'scan_cache'} || 'atstart',
991 CPAN->debug($debug) if $CPAN::DEBUG;
995 #-> sub CPAN::CacheMgr::scan_cache ;
999 $CPAN::Frontend->mydie("Unknown scan_cache argument: $self->{SCAN}")
1001 $CPAN::Frontend->myprint(
1008 return if $CPAN::Signal;
1013 package CPAN::Debug;
1015 #-> sub CPAN::Debug::debug ;
1025 if ($CPAN::DEBUG{$caller} & $CPAN::DEBUG){
1029 $CPAN::Frontend->myprint($arg->as_string);
1031 $CPAN::Frontend->myprint(Data::Dumper::Dumper($arg));
1034 $CPAN::Frontend->myprint("Debug($caller:$func,$line,[$rest]): $arg\n");
1039 package CPAN::Config;
1041 #-> sub CPAN::Config::edit ;
1046 CPAN->debug("self[$self]args[".join(" | ",@args)."]");
1053 CPAN->debug("o[$o]") if $CPAN::DEBUG;
1057 CPAN->debug("func[$func]") if $CPAN::DEBUG;
1061 push @{$CPAN::Config->{$o}}, @args;
1064 pop @{$CPAN::Config->{$o}};
1067 shift @{$CPAN::Config->{$o}};
1070 unshift @{$CPAN::Config->{$o}}, @args;
1073 splice @{$CPAN::Config->{$o}}, @args;
1076 $CPAN::Config->{$o} = [@args];
1083 undef $CPAN::FTP::Thesite;
1084 undef $CPAN::FTP::Themethod;
1088 $CPAN::Config->{$o} = $args[0] if defined $args[0];
1096 my $v = $CPAN::Config->{$k};
1104 $CPAN::Frontend->myprint(
1115 $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, $v);
1117 $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, "UNDEFINED");
1121 #-> sub CPAN::Config::commit ;
1125 $configpm ||= $INC{"CPAN/MyConfig.pm"};
1126 $configpm ||= $INC{"CPAN/Config.pm"};
1128 CPAN::Config::commit called without an argument.
1144 # This is CPAN.pm's systemwide configuration file. This file provides
1147 # ~/.cpan/CPAN/MyConfig.pm.
1154 $CPAN::Frontend->mydie("Couldn't open >$configpm: $!");
1155 $fh->print(qq[$msg\$CPAN::Config = \{\n]);
1156 foreach (sort keys %$CPAN::Config) {
1159 ExtUtils::MakeMaker::neatvalue($CPAN::Config->{$_}),
1170 $CPAN::Frontend->myprint("commit: wrote $configpm\n");
1175 #-> sub CPAN::Config::defaults ;
1185 undef $CPAN::Config->{'inhibit_startup_message'}; # lazy trick to
1207 $CPAN::Frontend->mywarn(<<END)
1224 #-> sub CPAN::Config::load ;
1229 eval {require CPAN::Config;}; # We eval because of some
1233 eval {require CPAN::MyConfig;}; # where you can override
1239 require CPAN::FirstTime;
1243 if (defined $INC{"CPAN/Config.pm"} && -w $INC{"CPAN/Config.pm"}) {
1244 $configpm = $INC{"CPAN/Config.pm"};
1246 } elsif (defined $INC{"CPAN/MyConfig.pm"} && -w $INC{"CPAN/MyConfig.pm"}) {
1247 $configpm = $INC{"CPAN/MyConfig.pm"};
1250 my($path_to_cpan) = File::Basename::dirname($INC{"CPAN.pm"});
1251 my($configpmdir) = File::Spec->catdir($path_to_cpan,"CPAN");
1257 $configpmdir = File::Spec->catdir($ENV{HOME},".cpan","CPAN");
1262 Carp::confess(qq{WARNING: CPAN.pm is unable to }.
1268 $CPAN::Frontend->myprint(<<END) if $redo && ! $theycalled;
1269 We have to reconfigure CPAN.pm due to following uninitialized parameters:
1273 $CPAN::Frontend->myprint(qq{
1277 CPAN::FirstTime::init($configpm);
1280 #-> sub CPAN::Config::missing_config_data ;
1292 push @miss, $_ unless defined $CPAN::Config->{$_};
1297 #-> sub CPAN::Config::unload ;
1299 delete $INC{'CPAN/MyConfig.pm'};
1300 delete $INC{'CPAN/Config.pm'};
1303 #-> sub CPAN::Config::help ;
1305 $CPAN::Frontend->myprint(q[
1323 undef; #don't reprint CPAN::Config
1326 #-> sub CPAN::Config::cpl ;
1330 CPAN->debug("word[$word] line[$line] pos[$pos]") if $CPAN::DEBUG;
1345 my(@o_conf) = (keys %CPAN::Config::can, keys %$CPAN::Config);
1349 package CPAN::Shell;
1351 #-> sub CPAN::Shell::h ;
1355 $CPAN::Frontend->myprint("Detailed help not yet implemented\n");
1357 $CPAN::Frontend->myprint(q{
1377 reload cpan load CPAN.pm again reload index load newer indices
1384 #-> sub CPAN::Shell::a ;
1391 $CPAN::Frontend->myprint($self->format_result('Author',@arg));
1394 #-> sub CPAN::Shell::ls ;
1400 $CPAN::Frontend->mywarn("ls command rejects argument $_: not an author\n");
1411 #-> sub CPAN::Shell::local_bundles ;
1415 foreach $incdir ($CPAN::Config->{'cpan_home'},@INC) {
1419 CPAN->debug("bdir[$bdir]\@bbase[@bbase]") if $CPAN::DEBUG;
1428 $CPAN::META->instance('CPAN::Bundle',"$bbase\::$entry");
1436 #-> sub CPAN::Shell::b ;
1439 CPAN->debug("which[@which]") if $CPAN::DEBUG;
1441 $CPAN::Frontend->myprint($self->format_result('Bundle',@which));
1444 #-> sub CPAN::Shell::d ;
1445 sub d { $CPAN::Frontend->myprint(shift->format_result('Distribution',@_));}
1447 #-> sub CPAN::Shell::m ;
1450 $CPAN::Frontend->myprint($self->format_result('Module',@_));
1453 #-> sub CPAN::Shell::i ;
1472 $CPAN::Frontend->myprint($result);
1475 #-> sub CPAN::Shell::o ;
1477 # CPAN::Shell::o and CPAN::Config::edit are closely related. 'o conf'
1482 CPAN->debug("o_type[$o_type] o_what[".join(" | ",@o_what)."]\n");
1487 $CPAN::Frontend->myprint("CPAN::Config options");
1488 if (exists $INC{'CPAN/Config.pm'}) {
1489 $CPAN::Frontend->myprint(" from $INC{'CPAN/Config.pm'}");
1491 if (exists $INC{'CPAN/MyConfig.pm'}) {
1492 $CPAN::Frontend->myprint(" and $INC{'CPAN/MyConfig.pm'}");
1494 $CPAN::Frontend->myprint(":\n");
1495 for $k (sort keys %CPAN::Config::can) {
1496 $v = $CPAN::Config::can{$k};
1497 $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, $v);
1499 $CPAN::Frontend->myprint("\n");
1500 for $k (sort keys %$CPAN::Config) {
1501 CPAN::Config->prettyprint($k);
1503 $CPAN::Frontend->myprint("\n");
1504 } elsif (!CPAN::Config->edit(@o_what)) {
1505 $CPAN::Frontend->myprint(qq{Type 'o conf' to view configuration }.
1514 if ($what =~ s/^-// && exists $CPAN::DEBUG{$what}) {
1515 $CPAN::DEBUG &= $CPAN::DEBUG ^ $CPAN::DEBUG{$what};
1518 if ( exists $CPAN::DEBUG{$what} ) {
1519 $CPAN::DEBUG |= $CPAN::DEBUG{$what};
1521 $CPAN::DEBUG = $what;
1524 for (values %CPAN::DEBUG) {
1527 $CPAN::DEBUG = $max;
1530 for (keys %CPAN::DEBUG) {
1532 $CPAN::DEBUG |= $CPAN::DEBUG{$_};
1535 $CPAN::Frontend->myprint("unknown argument [$what]\n")
1541 join(", ",sort(keys %CPAN::DEBUG), 'all').
1545 $CPAN::Frontend->myprint(Text::Wrap::fill("","",$raw));
1546 $CPAN::Frontend->myprint("\n\n");
1548 if ($CPAN::DEBUG) {
1549 $CPAN::Frontend->myprint("Options set for debugging:\n");
1551 for $k (sort {$CPAN::DEBUG{$a} <=> $CPAN::DEBUG{$b}} keys %CPAN::DEBUG) {
1552 $v = $CPAN::DEBUG{$k};
1553 $CPAN::Frontend->myprint(sprintf " %-14s(%s)\n", $k, $v)
1554 if $v & $CPAN::DEBUG;
1557 $CPAN::Frontend->myprint("Debugging turned off completely.\n");
1560 $CPAN::Frontend->myprint(qq{
1575 # $CPAN::Frontend->myprint(".($subr)");
1576 $CPAN::Frontend->myprint(".");
1583 #-> sub CPAN::Shell::reload ;
1587 $self->debug("self[$self]command[$command]arg[@arg]") if $CPAN::DEBUG;
1589 for my $f (qw(CPAN.pm CPAN/FirstTime.pm)) {
1591 CPAN->debug("reloading the whole $f") if $CPAN::DEBUG;
1598 $CPAN::Frontend->myprint("\n$redef subroutines redefined\n");
1601 CPAN::Index->force_reload;
1603 $CPAN::Frontend->myprint(qq{cpan re-evals the CPAN.pm file
1608 #-> sub CPAN::Shell::_binary_extensions ;
1616 my $dist = $CPAN::META->instance('CPAN::Distribution',$file);
1620 $CPAN::Frontend->myprint(".");
1624 $CPAN::Frontend->myprint("\n");
1628 #-> sub CPAN::Shell::recompile ;
1636 my $pack = $CPAN::META->instance('CPAN::Distribution',$cpan_file);
1641 $CPAN::Frontend->myprint(" CPAN: Recompiling $cpan_file\n\n");
1642 my $pack = $CPAN::META->instance('CPAN::Distribution',$cpan_file);
1644 $CPAN::Signal = 0; # it's tempting to reset Signal, so we can
1650 #-> sub CPAN::Shell::_u_r_common ;
1654 CPAN->debug("self[$self] what[$what] args[@_]") if $CPAN::DEBUG;
1667 $CPAN::Frontend->myprint(sprintf "%d matches in the database\n", $expand);
1675 return if $CPAN::Signal;
1687 next unless CPAN::Version->vgt($latest, $have);
1690 # to catch the case where CPAN has a version 0 and we have a version undef
1703 return if $CPAN::Signal; # this is sometimes lengthy
1716 $CPAN::Frontend->myprint("\n");
1717 $CPAN::Frontend->myprint(sprintf(
1724 "in CPAN file"
1732 $CPAN::META->has_inst("Term::ANSIColor")
1739 $CPAN::Frontend->myprint(sprintf $sprintf,
1750 $CPAN::Frontend->myprint("No modules found for @args\n");
1752 $CPAN::Frontend->myprint("All modules are up to date for @args\n");
1758 $CPAN::Frontend->myprint(qq{$version_zeroes installed module$s_has }.
1763 $CPAN::Frontend->myprint(qq{$version_undefs installed module$s_has no }.
1770 #-> sub CPAN::Shell::r ;
1775 #-> sub CPAN::Shell::u ;
1780 #-> sub CPAN::Shell::autobundle ;
1783 CPAN::Config->load unless $CPAN::Config_loaded++;
1785 my($todir) = File::Spec->catdir($CPAN::Config->{'cpan_home'},"Bundle");
1788 $CPAN::Frontend->myprint("Couldn't mkdir $todir for some reason\n");
1820 "by the autobundle routine in CPAN.pm.\n",
1823 $CPAN::Frontend->myprint("\nWrote bundle file
1827 #-> sub CPAN::Shell::expandany ;
1830 CPAN->debug("s[$s]") if $CPAN::DEBUG;
1832 $s = CPAN::Distribution->normalize($s);
1833 return $CPAN::META->instance('CPAN::Distribution',$s);
1843 if $CPAN::META->exists('CPAN::Module',$s);
1848 #-> sub CPAN::Shell::expand ;
1853 CPAN->debug("type[$type]args[@args]") if $CPAN::DEBUG;
1861 my $class = "CPAN::$type";
1863 CPAN->debug(sprintf "class[%s]regex[%s]command[%s]",
1867 ) if $CPAN::DEBUG;
1872 $CPAN::META->all_objects($class)
1877 CPAN->debug(sprintf(
1878 "Bug in CPAN: Empty id on obj[%s][%s]",
1881 )) if $CPAN::DEBUG;
1901 ! \$CPAN::Shell::ADVANCED_QUERY=1
1910 $CPAN::META->all_objects($class)
1924 $xarg = CPAN::Distribution->normalize($arg);
1926 if ($CPAN::META->exists($class,$xarg)) {
1927 $obj = $CPAN::META->instance($class,$xarg);
1928 } elsif ($CPAN::META->exists($class,$arg)) {
1929 $obj = $CPAN::META->instance($class,$arg);
1939 #-> sub CPAN::Shell::format_result ;
1960 #-> sub CPAN::Shell::print_ornameted ;
1966 if ($CPAN::Config->{term_is_latin}){
1973 if ($CPAN::META->has_inst("Term::ANSIColor")) {
2037 #-> sub CPAN::Shell::rematein ;
2048 CPAN->debug("pragma[$pragma]meth[$meth] some[@some]") if $CPAN::DEBUG;
2069 CPAN->debug("s is an object[$s]") if $CPAN::DEBUG;
2072 $CPAN::Frontend->mywarn("Sorry, $meth with a regular expression is ".
2077 CPAN->debug("calling expandany [$s]") if $CPAN::DEBUG;
2078 $obj = CPAN::Shell->expandany($s);
2082 CPAN::Queue->new($obj->id);
2084 } elsif ($CPAN::META->exists('CPAN::Author',$s)) {
2085 $obj = $CPAN::META->instance('CPAN::Author',$s);
2089 $CPAN::Frontend->myprint(
2098 $CPAN::Frontend
2114 while ($s = CPAN::Queue->first) {
2119 $obj = CPAN::Shell->expandany($s);
2126 # "CPAN::Distribution" must know
2132 CPAN->debug(
2136 ) if $CPAN::DEBUG;
2139 CPAN::Queue->delete($s);
2141 CPAN->debug("failed");
2145 CPAN::Queue->delete_first($s);
2152 #-> sub CPAN::Shell::dump ;
2154 #-> sub CPAN::Shell::force ;
2156 #-> sub CPAN::Shell::get ;
2158 #-> sub CPAN::Shell::readme ;
2160 #-> sub CPAN::Shell::make ;
2162 #-> sub CPAN::Shell::test ;
2164 #-> sub CPAN::Shell::install ;
2166 #-> sub CPAN::Shell::clean ;
2168 #-> sub CPAN::Shell::look ;
2170 #-> sub CPAN::Shell::cvs_import ;
2173 package CPAN::LWP::UserAgent;
2177 if ($CPAN::META->has_usable('LWP::UserAgent')) {
2182 $CPAN::Frontend->mywarn("LWP::UserAgent not available\n");
2190 } elsif (defined $CPAN::Config->{proxy_user} &&
2191 defined $CPAN::Config->{proxy_pass}) {
2192 $USER = $CPAN::Config->{proxy_user};
2193 $PASSWD = $CPAN::Config->{proxy_pass};
2202 if ($CPAN::META->has_inst("Term::ReadKey")) {
2205 $CPAN::Frontend->mywarn("Warning: Term::ReadKey seems not to be available, your password will be echoed to the terminal!\n");
2208 if ($CPAN::META->has_inst("Term::ReadKey")) {
2211 $CPAN::Frontend->myprint("\n\n");
2242 package CPAN::FTP;
2244 #-> sub CPAN::FTP::ftp_get ;
2250 ) if $CPAN::DEBUG;
2253 $ftp->debug(1) if $CPAN::DEBUG{'FTP'} & $CPAN::DEBUG;
2264 $class->debug(qq[Going to ->get("$file","$target")\n]) if $CPAN::DEBUG;
2275 # > *** /install/perl/live/lib/CPAN.pm- Wed Sep 24 13:08:48 1997
2283 # > + my $proxy = $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'};
2287 # > + my $noproxy = $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'};
2301 #-> sub CPAN::FTP::localize ;
2308 if $CPAN::DEBUG;
2343 $CPAN::Frontend->mywarn(qq{Warning: You are not allowed to write into }.
2349 if ($CPAN::META->has_usable('LWP::UserAgent')) {
2351 CPAN::LWP::UserAgent->config;
2352 eval {$Ua = CPAN::LWP::UserAgent->new;}; # Why is has_usable still not fit enough?
2354 $CPAN::Frontend->mywarn("CPAN::LWP::UserAgent->new dies with $@\n")
2355 if $CPAN::DEBUG;
2359 if $var = $CPAN::Config->{ftp_proxy} || $ENV{ftp_proxy};
2361 if $var = $CPAN::Config->{http_proxy} || $ENV{http_proxy};
2366 # > I note that although CPAN.pm can use proxies, it doesn't seem equipped to
2377 if $var = $CPAN::Config->{no_proxy} || $ENV{no_proxy};
2382 $ENV{$prx} = $CPAN::Config->{$prx} if $CPAN::Config->{$prx};
2388 $CPAN::Config->{urllist} ||= [];
2389 unless (ref $CPAN::Config->{urllist} eq 'ARRAY') {
2392 $last = $#{$CPAN::Config->{urllist}};
2398 (substr($CPAN::Config->{urllist}[$b],0,4) eq "file")
2400 (substr($CPAN::Config->{urllist}[$a],0,4) eq "file")
2429 $self->debug("level[$level]") if $CPAN::DEBUG;
2433 last if $CPAN::Signal; # need to cleanup
2436 unless ($CPAN::Signal) {
2440 join(", ", @{$CPAN::Config->{urllist}}).
2443 $CPAN::Frontend->myprint(Text::Wrap::wrap("","",@mess). "\n\n");
2445 $CPAN::Frontend->myprint("Could not fetch $file\n");
2449 $CPAN::Frontend->myprint("Trying to get away with old file:\n" .
2460 my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
2463 $self->debug("localizing perlish[$url]") if $CPAN::DEBUG;
2466 if ($CPAN::META->has_inst('URI::URL')) {
2480 $self->debug("without URI::URL we try local file $l") if $CPAN::DEBUG;
2488 $self->debug("found compressed $l.gz") if $CPAN::DEBUG;
2489 CPAN::Tarzip->gunzip("$l.gz", $aslocal);
2496 if ($CPAN::META->has_usable('LWP')) {
2497 $CPAN::Frontend->myprint("Fetching with LWP:
2501 CPAN::LWP::UserAgent->config;
2502 eval { $Ua = CPAN::LWP::UserAgent->new; };
2504 $CPAN::Frontend->mywarn("CPAN::LWP::UserAgent->new dies with $@\n");
2516 $CPAN::Frontend->myprint("Fetching with LWP:
2521 CPAN::Tarzip->gunzip("$aslocal.gz",$aslocal)
2527 $CPAN::Frontend->myprint(sprintf(
2537 $CPAN::Frontend->myprint("LWP not available\n");
2539 return if $CPAN::Signal;
2543 if ($CPAN::META->has_usable('Net::FTP')) {
2545 $CPAN::Frontend->myprint("Fetching with Net::FTP:
2549 "aslocal[$aslocal]") if $CPAN::DEBUG;
2550 if (CPAN::FTP->ftp_get($host,$dir,$getfile,$aslocal)) {
2556 $CPAN::Frontend->myprint("Fetching with Net::FTP
2559 if (CPAN::FTP->ftp_get($host,
2563 CPAN::Tarzip->gunzip($gz,$aslocal)
2572 return if $CPAN::Signal;
2584 my($devnull) = $CPAN::Config->{devnull} || "";
2589 my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
2606 $self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG;
2609 next unless exists $CPAN::Config->{$f};
2610 $funkyftp = $CPAN::Config->{$f};
2630 $CPAN::Frontend->myprint(
2637 $self->debug("system[$system]") if $CPAN::DEBUG;
2650 if (CPAN::Tarzip->gtest($asl_ungz)) {
2654 CPAN::Tarzip->gzip($asl_ungz,$asl_gz);
2664 $CPAN::Frontend->myprint(
2670 $self->debug("system[$system]") if $CPAN::DEBUG;
2677 if (CPAN::Tarzip->gtest($asl_gz)) {
2678 CPAN::Tarzip->gunzip($asl_gz,$aslocal);
2693 $CPAN::Frontend->myprint(qq{
2698 return if $CPAN::Signal;
2709 my $ftpbin = $CPAN::Config->{ftp};
2712 $CPAN::Frontend->myprint("No external ftp command available\n\n");
2715 my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
2718 $self->debug("localizing ftpwise[$url]") if $CPAN::DEBUG;
2727 my($netrc) = CPAN::FTP::netrc->new;
2729 my($verbose) = $CPAN::DEBUG{'FTP'} & $CPAN::DEBUG ? " -v" : "";
2742 CPAN->debug("No ~/.netrc file found") if $CPAN::DEBUG;
2744 CPAN->debug(sprintf("hasdef[%d]cont($host)[%d]",
2746 $netrc->contains($host))) if $CPAN::DEBUG;
2748 $CPAN::Frontend->myprint(qq{
2762 $CPAN::Frontend->myprint("GOT $aslocal\n");
2766 $CPAN::Frontend->myprint("Hmm... Still failed!\n");
2768 return if $CPAN::Signal;
2770 $CPAN::Frontend->mywarn(qq{Your $netrcfile is not }.
2774 $CPAN::Frontend->mywarn("Your ~/.netrc neither contains $host
2781 $CPAN::Frontend->myprint(qq{Issuing "$ftpbin$verbose -n"\n});
2792 $CPAN::Frontend->myprint("GOT $aslocal\n");
2796 $CPAN::Frontend->myprint("Bad luck... Still failed!\n");
2798 return if $CPAN::Signal;
2799 $CPAN::Frontend->myprint("Can't access URL $url.\n\n");
2812 $CPAN::Frontend->myprint(qq{
2820 # CPAN::FTP::ls
2884 package CPAN::FTP::netrc;
2929 # CPAN::FTP::hasdefault;
2941 package CPAN::Complete;
2964 #-> sub CPAN::Complete::cpl ;
2970 CPAN->debug("word [$word] line[$line] pos[$pos]") if $CPAN::DEBUG;
2977 @return = grep /^$word/, @CPAN::Complete::COMMANDS;
2981 @return = cplx('CPAN::Author',uc($word));
2983 CPAN::Shell->local_bundles;
2984 @return = cplx('CPAN::Bundle',$word);
2986 @return = cplx('CPAN::Distribution',$word);
2991 CPAN::Shell->local_bundles;
2993 @return = (cplx('CPAN::Module',$word),cplx('CPAN::Bundle',$word));
3002 @return = (cplx('CPAN::Module',$word),cplx('CPAN::Bundle',$word));
3009 #-> sub CPAN::Complete::cplx ;
3016 sort grep /^\Q$word\E/, map { $_->id } $CPAN::META->all_objects($class);
3019 #-> sub CPAN::Complete::cpl_any ;
3023 cplx('CPAN::Author',$word),
3024 cplx('CPAN::Bundle',$word),
3025 cplx('CPAN::Distribution',$word),
3026 cplx('CPAN::Module',$word),
3030 #-> sub CPAN::Complete::cpl_reload ;
3035 CPAN->debug("word[$word] line[$line] pos[$pos]") if $CPAN::DEBUG;
3041 #-> sub CPAN::Complete::cpl_option ;
3046 CPAN->debug("word[$word] line[$line] pos[$pos]") if $CPAN::DEBUG;
3054 return CPAN::Config::cpl(@_);
3056 return sort grep /^\Q$word\E/, sort keys %CPAN::DEBUG, 'all';
3060 package CPAN::Index;
3062 #-> sub CPAN::Index::force_reload ;
3065 $CPAN::Index::LAST_TIME = 0;
3069 #-> sub CPAN::Index::reload ;
3076 for ($CPAN::Config->{index_expire}) {
3079 unless (1 || $CPAN::Have_warned->{readmetadatacache}++) {
3080 # debug here when CPAN doesn't seem to read the Metadata
3082 Carp::cluck("META-PROTOCOL[$CPAN::META->{PROTOCOL}]");
3084 unless ($CPAN::META->{PROTOCOL}) {
3086 $CPAN::META->{PROTOCOL} ||= "1.0";
3088 if ( $CPAN::META->{PROTOCOL} < PROTOCOL ) {
3092 return if $LAST_TIME + $CPAN::Config->{index_expire}*86400 > $time
3097 undef $CPAN::META; # Neue Gruendlichkeit since v1.52(r1.274)
3098 $CPAN::META = CPAN->new;
3103 local $CPAN::META->{PROTOCOL} = PROTOCOL;
3117 return if $CPAN::Signal; # this is sometimes lengthy
3128 return if $CPAN::Signal; # this is sometimes lengthy
3140 CPAN->debug($debug) if $CPAN::DEBUG;
3143 $CPAN::META->{PROTOCOL} = PROTOCOL;
3146 #-> sub CPAN::Index::reload_x ;
3150 CPAN::Config->load; # we should guarantee loading wherever we rely
3153 my $abs_wanted = File::Spec->catfile($CPAN::Config->{'keep_source_where'},
3157 -M $abs_wanted < $CPAN::Config->{'index_expire'} &&
3160 my $s = $CPAN::Config->{'index_expire'} == 1 ? "" : "s";
3161 $cl->debug(qq{$abs_wanted younger than $CPAN::Config->{'index_expire'} }.
3167 return CPAN::FTP->localize($wanted,$abs_wanted,$force);
3170 #-> sub CPAN::Index::rd_authindex ;
3175 $CPAN::Frontend->myprint("Going to read $index_target\n");
3177 tie *FH, CPAN::Tarzip, $index_target;
3186 my $userobj = $CPAN::META->instance('CPAN::Author',$userid);
3188 return if $CPAN::Signal;
3199 #-> sub CPAN::Index::rd_modpacks ;
3204 $CPAN::Frontend->myprint("Going to read $index_target\n");
3205 my $fh = CPAN::Tarzip->TIEHANDLE($index_target);
3225 than one CPAN mirror. I'll continue but problems seem likely to
3235 CPAN mirror. I'll continue but problems seem likely to happen.\a\n},
3243 than one CPAN mirror. I'll continue but problems seem likely to
3250 $CPAN::Frontend
3255 if ($CPAN::META->has_inst(HTTP::Date)) {
3260 $CPAN::Frontend
3263 Please check the host you chose as your CPAN mirror for staleness.
3269 $CPAN::Frontend->myprint(" HTTP::Date not available\n");
3276 my $secondtime = $CPAN::META->exists("CPAN::Module","CPAN");
3277 CPAN->debug("secondtime[$secondtime]") if $CPAN::DEBUG;
3287 if ($mod eq 'CPAN' &&
3289 CPAN::Queue->exists('Bundle::CPAN') ||
3290 CPAN::Queue->exists('CPAN')
3294 if ($version > $CPAN::VERSION){
3295 $CPAN::Frontend->myprint(qq{
3296 There's a new CPAN.pm version (v$version) available!
3297 [Current version is v$CPAN::VERSION]
3299 install Bundle::CPAN
3305 $CPAN::Frontend->myprint(qq{\n});
3307 last if $CPAN::Signal;
3313 $id = $CPAN::META->instance('CPAN::Bundle',$mod);
3320 # $CPAN::META->instance('CPAN::Module',$mod);
3325 $id = $CPAN::META->instance('CPAN::Module',$mod);
3330 # different. CPAN prohibits same
3341 if ($CPAN::META->exists('CPAN::Distribution',$dist)) {
3345 ## my $obj = $CPAN::META->instance(
3346 ## 'CPAN::Distribution' => $dist
3350 $CPAN::META->instance(
3351 'CPAN::Distribution' => $dist
3359 CPAN->debug("exists name[$name]") if $CPAN::DEBUG;
3363 return if $CPAN::Signal;
3367 for my $class (qw(CPAN::Module CPAN::Bundle CPAN::Distribution)) {
3368 for my $o ($CPAN::META->all_objects($class)) {
3370 $CPAN::META->delete($class,$o->{ID});
3371 CPAN->debug("deleting ID[$o->{ID}] in class[$class]")
3372 if $CPAN::DEBUG;
3378 #-> sub CPAN::Index::rd_modlist ;
3382 $CPAN::Frontend->myprint("Going to read $index_target\n");
3383 my $fh = CPAN::Tarzip->TIEHANDLE($index_target);
3401 push @eval, q{CPAN::Modulelist->data;};
3403 my($comp) = Safe->new("CPAN::Safe1");
3407 return if $CPAN::Signal;
3409 my $obj = $CPAN::META->instance("CPAN::Module",$_);
3412 return if $CPAN::Signal;
3416 #-> sub CPAN::Index::write_metadata_cache ;
3419 return unless $CPAN::Config->{'cache_metadata'};
3420 return unless $CPAN::META->has_usable("Storable");
3422 foreach my $k (qw(CPAN::Bundle CPAN::Author CPAN::Module
3423 CPAN::Distribution)) {
3424 $cache->{$k} = $CPAN::META->{readonly}{$k}; # unsafe meta access, ok
3426 my $metadata_file = File::Spec->catfile($CPAN::Config->{cpan_home},"Metadata");
3430 $CPAN::Frontend->myprint("Going to write $metadata_file\n");
3432 $CPAN::Frontend->mywarn($@) if $@; # ?? missing "\n" after $@ in mywarn ??
3435 #-> sub CPAN::Index::read_metadata_cache ;
3438 return unless $CPAN::Config->{'cache_metadata'};
3439 return unless $CPAN::META->has_usable("Storable");
3440 my $metadata_file = File::Spec->catfile($CPAN::Config->{cpan_home},"Metadata");
3442 $CPAN::Frontend->myprint("Going to read $metadata_file\n");
3445 $CPAN::Frontend->mywarn($@) if $@; # ?? missing "\n" after $@ in mywarn ??
3452 $CPAN::Frontend->mywarn(sprintf("Ignoring Metadata cache written ".
3460 $CPAN::Frontend->mywarn("Ignoring Metadata cache written ".
3467 next unless $class =~ /^CPAN::/;
3468 $CPAN::META->{readonly}{$class} = $v; # unsafe meta access, ok
3470 $CPAN::META->{readwrite}{$class}{$id} ||=
3477 $CPAN::Frontend->myprint("Warning: Found no data in $metadata_file\n");
3481 $CPAN::Frontend->myprint("Warning: Found only $idcnt objects ".
3485 $CPAN::META->{PROTOCOL} ||=
3490 $CPAN::Frontend->myprint(" Database was generated on $DATE_OF_02\n")
3495 package CPAN::InfoObj;
3505 #-> sub CPAN::InfoObj::new ;
3518 #-> sub CPAN::InfoObj::set ;
3530 CPAN->debug("Bug? Empty ID, rejecting");
3534 $CPAN::META->{readonly}{$class}{$self->id} ||= {};
3541 #-> sub CPAN::InfoObj::as_glimpse ;
3546 $class =~ s/^CPAN:://;
3551 #-> sub CPAN::InfoObj::as_string ;
3556 $class =~ s/^CPAN:://;
3564 if ($email = $CPAN::META->instance("CPAN::Author",
3596 #-> sub CPAN::InfoObj::author ;
3599 $CPAN::META->instance("CPAN::Author",$self->cpan_userid)->fullname;
3602 #-> sub CPAN::InfoObj::dump ;
3609 package CPAN::Author;
3611 #-> sub CPAN::Author::id
3615 $CPAN::Frontend->mydie("Illegal author id[$id]") unless $id =~ /^[A-Z]/;
3619 #-> sub CPAN::Author::as_glimpse ;
3624 $class =~ s/^CPAN:://;
3633 #-> sub CPAN::Author::fullname ;
3639 #-> sub CPAN::Author::email ;
3642 #-> sub CPAN::Author::ls ;
3647 # adapted from CPAN::Distribution::verifyMD5 ;
3655 $CPAN::Frontend->myprint("No files in the directory of $id\n");
3660 $CPAN::Frontend->myprint("No files in the directory of $id\n");
3664 $CPAN::Frontend->myprint(join "", map {
3670 #-> sub CPAN::Author::dir_listing ;
3676 File::Spec->catfile($CPAN::Config->{keep_source_where},
3682 $force = $stat[9] + $CPAN::Config->{index_expire}*86400 <= time;
3684 my $lc_file = CPAN::FTP->localize("authors/id/@$chksumfile",
3687 $CPAN::Frontend->myprint("Trying $lc_want.gz\n");
3689 $lc_file = CPAN::FTP->localize("authors/id/@$chksumfile",
3693 CPAN::Tarzip->gunzip("$lc_file.gz",$lc_file);
3699 # adapted from CPAN::Distribution::MD5_check_file ;
3740 package CPAN::Distribution;
3750 # CPAN::Distribution::normalize
3761 $CPAN::Frontend->mywarn("Strange distribution name [$s]\n");
3762 CPAN->debug("s[$s]") if $CPAN::DEBUG;
3767 #-> sub CPAN::Distribution::color_cmd_tmps ;
3778 $CPAN::Frontend->mydie(CPAN::Exception::RecursiveDependency->new($ancestors));
3784 my $premo = CPAN::Shell->expand("Module",$pre);
3795 #-> sub CPAN::Distribution::as_string ;
3802 #-> sub CPAN::Distribution::containsmods ;
3807 for my $mod ($CPAN::META->all_objects("CPAN::Module")) {
3817 #-> sub CPAN::Distribution::uptodate ;
3822 my $obj = CPAN::Shell->expandany($c);
3828 #-> sub CPAN::Distribution::called_for ;
3835 #-> sub CPAN::Distribution::safe_chdir ;
3842 $self->debug(sprintf "changed directory to %s", CPAN::anycwd())
3843 if $CPAN::DEBUG;
3845 my $cwd = CPAN::anycwd();
3846 $CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] }.
3851 #-> sub CPAN::Distribution::get ;
3858 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
3860 my $sub_wd = CPAN::anycwd(); # for cleaning up as good as possible
3869 $CPAN::Config->{keep_source_where},
3875 $self->debug("Doing localize") if $CPAN::DEBUG;
3877 CPAN::FTP->localize("authors/id/$self->{ID}",
3880 if ($CPAN::Index::DATE_OF_02) {
3882 "on $CPAN::Index::DATE_OF_02\n";
3884 $CPAN::Frontend->mydie("Giving up on '$local_wanted'\n$note");
3886 $self->debug("local_file[$local_file]") if $CPAN::DEBUG;
3888 return if $CPAN::Signal;
3893 if ($CPAN::META->has_inst("Digest::MD5")) {
3899 return if $CPAN::Signal;
3904 $CPAN::META->{cachemgr} ||= CPAN::CacheMgr->new(); # unsafe meta access, ok
3905 my $builddir = $CPAN::META->{cachemgr}->dir; # unsafe meta access, ok
3907 $self->debug("Removing tmp") if $CPAN::DEBUG;
3910 if ($CPAN::Signal){
3920 $self->{was_uncompressed}++ unless CPAN::Tarzip->gtest($local_file);
3925 $self->{was_uncompressed}++ unless CPAN::Tarzip->gtest($local_file);
3944 if $CPAN::DEBUG;
3945 -d $packagedir and $CPAN::Frontend->myprint("Removing previously used ".
3955 )) if $CPAN::DEBUG;
3959 CPAN->debug("no userid? self[$self]");
3966 $self->debug("packagedir[$packagedir]") if $CPAN::DEBUG;
3974 if ($CPAN::Signal){
3998 CPAN::anycwd(),
3999 )) if $CPAN::DEBUG;
4005 $CPAN::Frontend->myprint(qq{
4019 $CPAN::Frontend->myprint(qq{Package seems to come without Makefile.PL.
4031 qq{# This Makefile.PL has been autogenerated by the module CPAN.pm
4046 # CPAN::Distribution::untar_me ;
4050 if (CPAN::Tarzip->untar($local_file)) {
4057 # CPAN::Distribution::unzip_me ;
4061 if (CPAN::Tarzip->unzip($local_file)) {
4074 if (CPAN::Tarzip->gunzip($local_file,$to)) {
4081 #-> sub CPAN::Distribution::new ;
4085 # $CPAN::META->{cachemgr} ||= CPAN::CacheMgr->new();
4091 #-> sub CPAN::Distribution::look ;
4100 if ( $CPAN::Config->{'shell'} ) {
4101 $CPAN::Frontend->myprint(qq{
4105 $CPAN::Frontend->myprint(qq{
4117 $CPAN::Frontend->mywarn(qq{
4122 my $pwd = CPAN::anycwd();
4124 $CPAN::Frontend->myprint(qq{Working directory is $dir\n});
4125 unless (system($CPAN::Config->{'shell'}) == 0) {
4127 $CPAN::Frontend->mywarn("Subprocess shell exit code $code\n");
4132 # CPAN::Distribution::cvs_import ;
4139 my $module = $CPAN::META->instance('CPAN::Module', $package);
4147 $CPAN::Config->{cvsroot} || $ENV{CVSROOT};
4149 $CPAN::Config->{cvs_site_perl} || $ENV{CVS_SITE_PERL};
4158 my $pwd = CPAN::anycwd();
4159 chdir($dir) or $CPAN::Frontend->mydie(qq{Could not chdir to "$dir": $!});
4161 $CPAN::Frontend->myprint(qq{Working directory is $dir\n});
4163 $CPAN::Frontend->myprint(qq{@cmd\n});
4165 $CPAN::Frontend->mydie("cvs import failed");
4166 chdir($pwd) or $CPAN::Frontend->mydie(qq{Could not chdir to "$pwd": $!});
4169 #-> sub CPAN::Distribution::readme ;
4174 $self->debug("sans[$sans] suffix[$suffix]\n") if $CPAN::DEBUG;
4178 $CPAN::Config->{keep_source_where},
4183 $self->debug("Doing localize") if $CPAN::DEBUG;
4184 $local_file = CPAN::FTP->localize("authors/id/$sans.readme",
4186 or $CPAN::Frontend->mydie(qq{No $sans.readme found});;
4195 $fh_pager->open("|$CPAN::Config->{'pager'}")
4196 or die "Could not open pager $CPAN::Config->{'pager'}: $!";
4199 or $CPAN::Frontend->mydie(qq{Could not open "$local_file": $!});
4200 $CPAN::Frontend->myprint(qq{
4203 with pager "$CPAN::Config->{'pager'}"
4209 #-> sub CPAN::Distribution::verifyMD5 ;
4216 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
4223 File::Spec->catfile($CPAN::Config->{keep_source_where},
4233 $lc_file = CPAN::FTP->localize("authors/id/@local",
4236 $CPAN::Frontend->myprint("Trying $lc_want.gz\n");
4238 $lc_file = CPAN::FTP->localize("authors/id/@local",
4242 CPAN::Tarzip->gunzip("$lc_file.gz",$lc_file);
4250 #-> sub CPAN::Distribution::MD5_check_file ;
4274 "$cksum->{$basename}{md5}\n") if $CPAN::DEBUG;
4280 $fh = CPAN::Tarzip->TIEHANDLE($file);
4296 $CPAN::Frontend->myprint("Checksum for $file ok\n");
4299 $CPAN::Frontend->myprint(qq{\nChecksum mismatch for }.
4303 $CPAN::META->instance(
4304 'CPAN::Author',
4313 $CPAN::Frontend->mydie(Text::Wrap::wrap("","",$wrap));
4318 # $CPAN::Frontend->myprint("\n\n");
4326 $CPAN::Frontend->mywarn(qq{
4334 $answer =~ /^\s*y/i or $CPAN::Frontend->mydie("Aborted.");
4341 #-> sub CPAN::Distribution::eq_MD5 ;
4355 #-> sub CPAN::Distribution::force ;
4380 #-> sub CPAN::Distribution::unforce ;
4386 #-> sub CPAN::Distribution::isa_perl ;
4410 #-> sub CPAN::Distribution::perl ;
4414 my $pwd = CPAN::anycwd();
4434 #-> sub CPAN::Distribution::make ;
4437 $CPAN::Frontend->myprint(sprintf "Running make for %s\n", $self->id);
4445 $CPAN::Frontend->mywarn(sprintf qq{
4453 $CPAN::META->instance(
4454 'CPAN::Module',
4483 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
4485 $CPAN::Frontend->myprint("\n CPAN.pm: Going to build ".$self->id."\n\n");
4488 $self->debug("Changed directory to $builddir") if $CPAN::DEBUG;
4505 $system = "$perl $switch Makefile.PL $CPAN::Config->{makepl_arg}";
4511 if ($CPAN::Config->{inactivity_timeout}) {
4513 alarm $CPAN::Config->{inactivity_timeout};
4526 $CPAN::Frontend->myprint("Cannot fork: $!");
4534 $CPAN::Frontend->myprint($@);
4558 if ($CPAN::Signal){
4565 $system = join " ", $CPAN::Config->{'make'}, $CPAN::Config->{make_arg};
4567 $CPAN::Frontend->myprint(" $system -- OK\n");
4572 $CPAN::Frontend->myprint(" $system -- NOT OK\n");
4580 $CPAN::Frontend->myprint("---- Unsatisfied dependencies detected ".
4584 $CPAN::Frontend->myprint(" $p\n");
4587 if ($CPAN::Config->{prerequisites_policy} eq "follow") {
4589 } elsif ($CPAN::Config->{prerequisites_policy} eq "ask") {
4597 $CPAN::Frontend->
4604 CPAN::Shell->expandany($p)->color_cmd_tmps(0,1);
4606 CPAN::Queue->jumpqueue(@prereq,$id); # queue them and requeue yourself
4612 #-> sub CPAN::Distribution::unsat_prereq ;
4618 my $nmo = $CPAN::META->instance("CPAN::Module",$need_module);
4636 ! CPAN::Version->vgt($need_version, $nmo->inst_version)
4638 CPAN->debug(sprintf "id[%s]inst_file[%s]inst_version[%s]need_version[%s]",
4642 CPAN::Version->readable($need_version)
4659 #-> sub CPAN::Distribution::prereq_pm ;
4701 #-> sub CPAN::Distribution::test ;
4705 if ($CPAN::Signal){
4709 $CPAN::Frontend->myprint("Running make test\n");
4730 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
4735 if $CPAN::DEBUG;
4743 $CPAN::META->set_perl5lib;
4744 my $system = join " ", $CPAN::Config->{'make'}, "test";
4746 $CPAN::Frontend->myprint(" $system -- OK\n");
4747 $CPAN::META->is_tested($self->{'build_dir'});
4752 $CPAN::Frontend->myprint(" $system -- NOT OK\n");
4756 #-> sub CPAN::Distribution::clean ;
4759 $CPAN::Frontend->myprint("Running make clean\n");
4765 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
4769 $self->debug("Changed directory to $self->{'build_dir'}") if $CPAN::DEBUG;
4776 my $system = join " ", $CPAN::Config->{'make'}, "clean";
4778 $CPAN::Frontend->myprint(" $system -- OK\n");
4797 $CPAN::Frontend->myprint(qq{ $system -- NOT OK
4806 #-> sub CPAN::Distribution::install ;
4810 if ($CPAN::Signal){
4814 $CPAN::Frontend->myprint("Running make install\n");
4839 $CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
4844 if $CPAN::DEBUG;
4851 my $system = join(" ", $CPAN::Config->{'make'},
4852 "install", $CPAN::Config->{make_install_arg});
4857 $CPAN::Frontend->myprint($_);
4862 $CPAN::Frontend->myprint(" $system -- OK\n");
4863 $CPAN::META->is_installed($self->{'build_dir'});
4867 $CPAN::Frontend->myprint(" $system -- NOT OK\n");
4869 $CPAN::Frontend->myprint(qq{ You may have to su }.
4876 #-> sub CPAN::Distribution::dir ;
4881 package CPAN::Bundle;
4885 $CPAN::Frontend->myprint($self->as_string);
4892 my $obj = CPAN::Shell->expandany($c) or next;
4897 #-> sub CPAN::Bundle::color_cmd_tmps ;
4909 $CPAN::Frontend->mydie(CPAN::Exception::RecursiveDependency->new($ancestors));
4914 my $obj = CPAN::Shell->expandany($c) or next;
4915 CPAN->debug("c[$c]obj[$obj]") if $CPAN::DEBUG;
4924 #-> sub CPAN::Bundle::as_string ;
4933 #-> sub CPAN::Bundle::contains ;
4938 $self->debug("inst_file[$inst_file]id[$id]") if $CPAN::DEBUG;
4941 $self->debug("no inst_file") if $CPAN::DEBUG;
4943 $CPAN::Frontend->mydie("I don't know a bundle with ID $id\n") unless
4946 $CPAN::Frontend->mydie("Bundle $id not found on disk and not on CPAN.
4949 my $dist = $CPAN::META->instance('CPAN::Distribution',
4952 $self->debug($dist->as_string) if $CPAN::DEBUG;
4953 my($todir) = $CPAN::Config->{'cpan_home'};
4970 $self->debug("inst_file[$inst_file]") if $CPAN::DEBUG;
4984 $self->debug("CONTAINS[@result]") if $CPAN::DEBUG;
4986 $CPAN::Frontend->mywarn(qq{
4996 #-> sub CPAN::Bundle::find_bundle_file
4999 $self->debug("where[$where]what[$what]") if $CPAN::DEBUG;
5000 ### The following two lines let CPAN.pm become Bundle/CPAN.pm :-(
5006 my $cwd = CPAN::anycwd();
5007 chdir $where or $CPAN::Frontend->mydie(qq{Could not chdir to "$where": $!});
5009 chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!});
5046 #-> sub CPAN::Bundle::inst_file ;
5054 foreach $incdir ($CPAN::Config->{'cpan_home'},@INC) {
5056 CPAN->debug("bfile[$bfile]") if $CPAN::DEBUG;
5059 if (!$bestv || CPAN::Version->vgt($foundv,$bestv)) {
5067 #-> sub CPAN::Bundle::inst_version ;
5074 #-> sub CPAN::Bundle::rematein ;
5077 $self->debug("self[$self] meth[$meth]") if $CPAN::DEBUG;
5083 my($type) = $s =~ m|/| ? 'CPAN::Distribution' :
5084 $s =~ m|^Bundle::| ? 'CPAN::Bundle' : 'CPAN::Module';
5085 if ($type eq 'CPAN::Distribution') {
5086 $CPAN::Frontend->mywarn(qq{
5093 $self->debug("type[$type] s[$s]") if $CPAN::DEBUG;
5094 my $obj = $CPAN::META->instance($type,$s);
5096 if ($obj->isa(CPAN::Bundle)
5129 $CPAN::Frontend->myprint(Text::Wrap::fill("","",$raw));
5130 $CPAN::Frontend->myprint("\n");
5147 $CPAN::Frontend->myprint(Text::Wrap::fill(" "," ",$paragraph));
5148 $CPAN::Frontend->myprint("\n");
5155 #sub CPAN::Bundle::xs_file
5162 #-> sub CPAN::Bundle::force ;
5164 #-> sub CPAN::Bundle::get ;
5166 #-> sub CPAN::Bundle::make ;
5168 #-> sub CPAN::Bundle::test ;
5174 #-> sub CPAN::Bundle::install ;
5179 #-> sub CPAN::Bundle::clean ;
5182 #-> sub CPAN::Bundle::uptodate ;
5188 my $obj = CPAN::Shell->expandany($c);
5194 #-> sub CPAN::Bundle::readme ;
5197 my($file) = $self->cpan_file or $CPAN::Frontend->myprint(qq{
5199 $self->debug("self[$self] file[$file]") if $CPAN::DEBUG;
5200 $CPAN::META->instance('CPAN::Distribution',$file)->readme;
5203 package CPAN::Module;
5206 # sub CPAN::Module::userid
5212 # sub CPAN::Module::description
5218 if ( my $dist = CPAN::Shell->expand("Distribution", $self->cpan_file) ) {
5223 #-> sub CPAN::Module::color_cmd_tmps ;
5234 $CPAN::Frontend->mydie(CPAN::Exception::RecursiveDependency->new($ancestors));
5238 if ( my $dist = CPAN::Shell->expand("Distribution", $self->cpan_file) ) {
5247 #-> sub CPAN::Module::as_glimpse ;
5252 $class =~ s/^CPAN:://;
5256 $CPAN::Shell::COLOR_REGISTERED
5258 $CPAN::META->has_inst("Term::ANSIColor")
5274 #-> sub CPAN::Module::as_string ;
5278 CPAN->debug("$self entering as_string") if $CPAN::DEBUG;
5280 $class =~ s/^CPAN:://;
5291 if ($author = CPAN::Shell->expand('Author',$userid)) {
5340 my $dist = $CPAN::META->instance('CPAN::Distribution',
5352 CPAN->debug("mff[$mff]") if $CPAN::DEBUG;
5365 CPAN->debug("lfl[$lfl]lfre[$lfre]") if $CPAN::DEBUG;
5421 #-> sub CPAN::Module::cpan_file ;
5422 # Note: also inherited by CPAN::Bundle
5425 CPAN->debug(sprintf "id[%s]", $self->id) if $CPAN::DEBUG;
5427 CPAN::Index->reload;
5434 if ($CPAN::META->exists("CPAN::Author",$userid)) {
5435 my $author = $CPAN::META->instance("CPAN::Author",
5454 #-> sub CPAN::Module::cpan_version ;
5467 #-> sub CPAN::Module::force ;
5473 #-> sub CPAN::Module::rematein ;
5476 $CPAN::Frontend->myprint(sprintf("Running %s for module %s\n",
5481 $CPAN::Frontend->mywarn(sprintf qq{
5482 The module %s isn\'t available on CPAN.
5484 Either the module has not yet been uploaded to CPAN, or it is
5493 my $pack = $CPAN::META->instance('CPAN::Distribution',$cpan_file);
5501 #-> sub CPAN::Module::readme ;
5503 #-> sub CPAN::Module::look ;
5505 #-> sub CPAN::Module::cvs_import ;
5507 #-> sub CPAN::Module::get ;
5509 #-> sub CPAN::Module::make ;
5514 #-> sub CPAN::Module::test ;
5520 #-> sub CPAN::Module::uptodate ;
5533 ! CPAN::Version->vgt($latest, $have)
5535 CPAN->debug("returning uptodate. inst_file[$inst_file] ".
5536 "latest[$latest] have[$have]") if $CPAN::DEBUG;
5541 #-> sub CPAN::Module::install ;
5549 $CPAN::Frontend->myprint( $self->id. " is up to date.\n");
5554 $CPAN::Frontend->mywarn(qq{
5562 #-> sub CPAN::Module::clean ;
5565 #-> sub CPAN::Module::inst_file ;
5580 #-> sub CPAN::Module::xs_file ;
5596 #-> sub CPAN::Module::inst_version ;
5625 # print it use CPAN::Version for print
5635 $have = CPAN::Version->readable($have);
5641 package CPAN::Tarzip;
5643 # CPAN::Tarzip::gzip
5646 if ($CPAN::META->has_inst("Compress::Zlib")) {
5649 or $CPAN::Frontend->mydie("Could not open $read: $!");
5651 or $CPAN::Frontend->mydie("Cannot gzopen $write: $!\n");
5658 system("$CPAN::Config->{gzip} -c $read > $write")==0;
5663 # CPAN::Tarzip::gunzip
5666 if ($CPAN::META->has_inst("Compress::Zlib")) {
5669 or $CPAN::Frontend->mydie("Could not open >$write: $!");
5671 or $CPAN::Frontend->mydie("Cannot gzopen $read: $!\n");
5674 $CPAN::Frontend->mydie("Error reading from $read: $!\n")
5680 system("$CPAN::Config->{gzip} -dc $read > $write")==0;
5685 # CPAN::Tarzip::gtest
5690 if ( $CPAN::META->has_inst("Compress::Zlib") ) {
5694 or $CPAN::Frontend->mydie(sprintf("Cannot gzopen %s: %s\n",
5705 CPAN->debug("hit an uncompressed file") if $CPAN::DEBUG;
5708 CPAN->debug("err[$err]success[$success]") if $CPAN::DEBUG;
5711 return system("$CPAN::Config->{gzip} -dt $read")==0;
5716 # CPAN::Tarzip::TIEHANDLE
5721 if ($CPAN::META->has_inst("Compress::Zlib")) {
5726 my $pipe = "$CPAN::Config->{gzip} --decompress --stdout $file |";
5735 # CPAN::Tarzip::READLINE
5751 # CPAN::Tarzip::READ
5766 # CPAN::Tarzip::DESTROY
5781 # CPAN::Tarzip::untar
5789 } elsif (MM->maybe_command($CPAN::Config->{gzip})
5791 MM->maybe_command($CPAN::Config->{'tar'})) {
5795 $CPAN::META->has_inst("Archive::Tar")
5797 $CPAN::META->has_inst("Compress::Zlib") ) {
5800 $CPAN::Frontend->mydie(qq{
5801 CPAN.pm needs either both external programs tar and gzip installed or
5810 $system = "$CPAN::Config->{gzip} --decompress --stdout " .
5811 "< $file | $CPAN::Config->{tar} xvf -";
5813 $system = "$CPAN::Config->{tar} xvf $file";
5820 if (CPAN::Tarzip->gunzip($file, $ungzf)) {
5821 $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n});
5823 $CPAN::Frontend->mydie(qq{Couldn\'t uncompress $file\n});
5827 $system = "$CPAN::Config->{tar} xvf $file";
5828 $CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
5830 $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
5832 $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n});
5851 $CPAN::Frontend->mydie("ALERT: Archive contains ".
5854 $CPAN::Frontend->myprint("$af\n");
5856 return if $CPAN::Signal;
5861 $CPAN::Frontend->mydie("ALERT: Archive contains ".
5864 $CPAN::Frontend->myprint("$af\n");
5866 return if $CPAN::Signal;
5880 if ($CPAN::META->has_inst("Archive::Zip")) {
5886 $CPAN::META->debug("Successfully read file[$file]") if $CPAN::DEBUG;
5891 $CPAN::Frontend->mydie("ALERT: Archive contains ".
5895 $CPAN::META->debug("af[$af]status[$status]") if $CPAN::DEBUG;
5898 return if $CPAN::Signal;
5902 my $unzip = $CPAN::Config->{unzip} or
5903 $CPAN::Frontend->mydie("Cannot unzip, no unzip program available");
5910 package CPAN::Version;
5911 # CPAN::Version::vcmp courtesy Jost Krieger
5915 CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG;
5943 $n =~ s/^v// or die "CPAN::Version::vstring() called with invalid arg [$n]";
5982 $CPAN::Frontend->mywarn("Suspicious version string seen [$n]\n");
5986 CPAN->debug("n[$n] better[$better]") if $CPAN::DEBUG;
5990 package CPAN;
5998 CPAN - query, download and build perl modules from CPAN sites
6008 use CPAN;
6016 features but no full compatibility. If you're new to CPAN.pm, you
6018 If you're already used to CPAN.pm you're welcome to continue using it,
6024 The CPAN module is designed to automate the make and install of perl
6029 Modules are fetched from one or more of the mirrored CPAN
6033 The CPAN module also supports the concept of named and versioned
6044 For extended searching capabilities there's a plugin for CPAN available,
6045 L<C<CPAN::WAIT>|CPAN::WAIT>. C<CPAN::WAIT> is a full-text search engine
6046 that indexes all documents available in CPAN authors directories. If
6047 C<CPAN::WAIT> is installed on your system, the interactive shell of
6048 CPAN.pm will enable the C<wq>, C<wr>, C<wd>, C<wl>, and C<wh> commands
6100 a module, CPAN determines the distribution file in which this module
6113 CPAN checks if an install is actually needed for it and prints
6117 CPAN also keeps track of what it has done within the current session
6148 C<ls> lists all distribution files in and below an author's CPAN
6155 CPAN.pm installs signal handlers for SIGINT and SIGTERM. While you are
6162 CPAN.pm ignores a SIGPIPE. If the user sets inactivity_timeout, a
6167 =head2 CPAN::Shell
6170 the package CPAN::Shell. If you enter the shell command, all your
6180 C<$CPAN::Config-E<gt>{cpan_home}/Bundle> directory. The file contains
6181 a list of all modules that are both available from CPAN and currently
6194 file produced earlier. CPAN installs the whole Bundle for you, but
6195 when you try to repeat the job on the second architecture, CPAN
6197 invoke CPAN's recompile on the second architecture and you're done.
6200 perl breaks binary compatibility. If one of the modules that CPAN uses
6201 is in turn depending on binary compatibility (so you cannot run CPAN
6202 commands), then you should try the CPAN::Nox module for recovery.
6204 =head2 The four C<CPAN::*> Classes: Author, Bundle, Module, Distribution
6207 for both users and programmer. CPAN.pm deals with above mentioned four
6226 on CPAN in both version 1.23 and 1.23_90, CPAN.pm offers a convenient
6234 distribution file resides on CPAN relative to the authors/id/
6241 CPAN::Module, the second by an object of class CPAN::Distribution.
6246 available as methods (C<CPAN::Shell-E<gt>install(...)>) and as
6250 CPAN::Shell. All commands that are available in the CPAN shell are
6251 methods of the class CPAN::Shell. Each of the commands that produce
6261 C<CPAN::Shell-E<gt>expand("Module",@things)> method. Expand returns a
6262 list of CPAN::Module objects according to the C<@things> arguments
6269 CPAN::Bundle objects for bundles, CPAN::Module objects for modules and
6270 CPAN::Distribution objects fro distributions.
6278 perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
6282 my $obj = CPAN::Shell->expand('Module',$mod);
6287 for $mod (CPAN::Shell->expand("Module","/./")){
6294 # find out which distribution on CPAN contains a module:
6295 print CPAN::Shell->expand("Module","Apache::Constants")->cpan_file
6297 Or if you want to write a cronjob to watch The CPAN, you could list
6300 perl -e 'use CPAN; CPAN::Shell->r;'
6310 # list all modules on my disk that have newer versions on CPAN
6311 for $mod (CPAN::Shell->expand("Module","/./")){
6314 printf "Module %s is installed as %s, could be updated to %s from CPAN\n",
6321 for $mod (CPAN::Shell->expand("Module","/Apache|LWP|CGI/")){
6327 $mod = CPAN::Shell->expand("Module","mod_perl");
6330 CPAN::Shell->r;
6336 The programming interface for the classes CPAN::Module,
6337 CPAN::Distribution, CPAN::Bundle, and CPAN::Author is still considered
6344 =item CPAN::Author::as_glimpse()
6348 =item CPAN::Author::as_string()
6352 =item CPAN::Author::email()
6356 =item CPAN::Author::fullname()
6360 =item CPAN::Author::name()
6364 =item CPAN::Bundle::as_glimpse()
6368 =item CPAN::Bundle::as_string()
6372 =item CPAN::Bundle::clean()
6376 =item CPAN::Bundle::contains()
6381 =item CPAN::Bundle::force($method,@args)
6383 Forces CPAN to perform a task that normally would have failed. Force
6386 internals of the object get the needed changes so that CPAN.pm does
6390 =item CPAN::Bundle::get()
6394 =item CPAN::Bundle::inst_file()
6397 C<$CPAN::Config->{cpan_home}>. Note that this is different from
6398 CPAN::Module::inst_file.
6400 =item CPAN::Bundle::inst_version()
6402 Like CPAN::Bundle::inst_file, but returns the $VERSION
6404 =item CPAN::Bundle::uptodate()
6408 =item CPAN::Bundle::install()
6412 =item CPAN::Bundle::make()
6416 =item CPAN::Bundle::readme()
6420 =item CPAN::Bundle::test()
6424 =item CPAN::Distribution::as_glimpse()
6428 =item CPAN::Distribution::as_string()
6432 =item CPAN::Distribution::clean()
6437 =item CPAN::Distribution::containsmods()
6444 =item CPAN::Distribution::cvs_import()
6453 =item CPAN::Distribution::dir()
6457 =item CPAN::Distribution::force($method,@args)
6459 Forces CPAN to perform a task that normally would have failed. Force
6462 internals of the object get the needed changes so that CPAN.pm does
6465 =item CPAN::Distribution::get()
6467 Downloads the distribution from CPAN and unpacks it. Does nothing if
6471 =item CPAN::Distribution::install()
6480 =item CPAN::Distribution::isa_perl()
6484 CPAN can contain a hint to achieve a return value of true for other
6487 =item CPAN::Distribution::look()
6492 =item CPAN::Distribution::make()
6499 =item CPAN::Distribution::prereq_pm()
6506 =item CPAN::Distribution::readme()
6509 through the pager specified in C<$CPAN::Config->{pager}>.
6511 =item CPAN::Distribution::test()
6516 =item CPAN::Distribution::uptodate()
6521 =item CPAN::Index::force_reload()
6525 =item CPAN::Index::reload()
6528 C<$CPAN::Config->{index_expire}> days.
6530 =item CPAN::InfoObj::dump()
6532 CPAN::Author, CPAN::Bundle, CPAN::Module, and CPAN::Distribution
6537 =item CPAN::Module::as_glimpse()
6541 =item CPAN::Module::as_string()
6545 =item CPAN::Module::clean()
6549 =item CPAN::Module::cpan_file()
6551 Returns the filename on CPAN that is associated with the module.
6553 =item CPAN::Module::cpan_version()
6555 Returns the latest version of this module available on CPAN.
6557 =item CPAN::Module::cvs_import()
6561 =item CPAN::Module::description()
6564 modules listed in The Module List (CPAN/modules/00modlist.long.html
6567 =item CPAN::Module::force($method,@args)
6569 Forces CPAN to perform a task that normally would have failed. Force
6572 internals of the object get the needed changes so that CPAN.pm does
6575 =item CPAN::Module::get()
6579 =item CPAN::Module::inst_file()
6585 =item CPAN::Module::inst_version()
6589 =item CPAN::Module::install()
6593 =item CPAN::Module::look()
6599 =item CPAN::Module::make()
6603 =item CPAN::Module::manpage_headline()
6610 =item CPAN::Module::readme()
6614 =item CPAN::Module::test()
6618 =item CPAN::Module::uptodate()
6622 =item CPAN::Module::userid()
6631 ($CPAN::Config->{build_dir}). It is a simple FIFO mechanism that
6633 all directories there gets bigger than $CPAN::Config->{build_cache}
6636 trusted by CPAN itself. This is due to the fact that the user might
6639 There is another directory ($CPAN::Config->{keep_source_where}) where
6670 Bundles are treated specially in the CPAN package. If you say 'install
6671 Bundle::Tkkit' (assuming such a bundle exists), CPAN will install all
6680 If you have a local mirror of CPAN and can access all files with
6683 required for non-UNIX systems or if your nearest CPAN site is
6692 This module presumes that all packages on CPAN
6721 interferences of the software producing the indices on CPAN, of the
6722 mirroring process on CPAN, of packaging, of configuration, of
6723 synchronicity, and of bugs within CPAN.pm.
6735 CPAN.pm works nicely without network too. If you maintain machines
6738 you might use CPAN.pm to put together all you need on a networked
6739 machine. Then copy the $CPAN::Config->{keep_source_where} (but not
6740 $CPAN::Config->{build_dir}) directory on a floppy. This floppy is kind
6741 of a personal CPAN. CPAN.pm on the non-networked machines works nicely
6746 When the CPAN module is used for the first time, a configuration
6748 result of the dialog is stored in a hash reference C< $CPAN::Config >
6749 in a file CPAN/Config.pm.
6751 The default values defined in the CPAN/Config.pm file can be
6752 overridden in a user specific file: CPAN/MyConfig.pm. Such a file is
6753 best placed in $HOME/.cpan/CPAN/MyConfig.pm, because $HOME/.cpan is
6754 added to the search path of the CPAN module before the use() or
6758 issueing the command C< o conf init > in the CPAN shell.
6760 Currently the following keys in the hash reference $CPAN::Config are
6769 loaded by the CPAN::has_inst() routine
6793 urllist arrayref to nearby CPAN sites (or equivalent locations)
6794 wait_list arrayref to a wait server to try (See CPAN::WAIT)
6796 http_proxy, } proxy requests. Both as CPAN::Config variables
6833 file://localhost/whatever/ftp/pub/CPAN/
6837 file:///home/ftp/pub/CPAN/
6843 C<file> URLs, CPAN always tries to get files from there first. This
6845 owner of a CD-ROM with CPAN contents is: include your local, possibly
6848 o conf urllist push file://localhost/CDROM/CPAN
6850 CPAN.pm will then fetch the index files from one of the CPAN sites
6864 There's no strong security layer in CPAN.pm. CPAN.pm helps you to
6873 Most functions in package CPAN are exported per default. The reason
6882 on the CPAN shell command line. This command writes a bundle definition
6893 things: dependencies and interactivity. CPAN.pm sometimes fails on
6900 ones later, so I can go out after a few minutes and leave CPAN.pm
6903 =head1 WORKING WITH CPAN.pm BEHIND FIREWALLS
6986 then you would configure CPAN.pm with the command
7003 I installed a new version of module X but CPAN keeps saying,
7009 CPAN.pm problem, you would have the same problem when installing the
7091 The reason for this is that CPAN does not know the dependencies of all
7097 CPAN.pm does not know the dependency tree in advance and cannot sort
7103 situation for dependencies on CPAN in general, but this will still
7109 can I integrate these modules with CPAN.pm but without uploading
7110 the modules to CPAN?
7112 Have a look at the CPAN::Site module.
7116 When I run CPAN's shell, I get error msg about line 1 to 4,
7128 Internally CPAN.pm uses the UTF-8 charset. If your terminal is
7133 cpan> ! $CPAN::Config->{term_is_latin}=1
7142 We should give coverage for B<all> of the CPAN and not just the PAUSE
7143 part, right? In this discussion CPAN and PAUSE have become equal --
7144 but they are not. PAUSE is authors/, modules/ and scripts/. CPAN is
7151 the user for special input, etc. then you may find CPAN is not able to
7162 http://member.nifty.ne.jp/hippo2000/perltips/CPAN.htm
7166 perl(1), CPAN::Nox(3)