@relo = (
"CPAN.pm",
"CPAN/Debug.pm",
"CPAN/Distroprefs.pm",
"CPAN/FirstTime.pm",
"CPAN/HandleConfig.pm",
"CPAN/Kwalify.pm",
"CPAN/Queue.pm",
"CPAN/Reporter/Config.pm",
"CPAN/Reporter/History.pm",
"CPAN/Reporter/PrereqCheck.pm",
"CPAN/Reporter.pm",
"CPAN/SQLite.pm",
"CPAN/Tarzip.pm",
"CPAN/Version.pm",
);
# record the initial timestamp for reload.
$reload = { map {$INC{$_} ? ($_,(stat $INC{$_})[9]) : ()} @relo };
@CPAN::Shell::ISA = qw(CPAN::Debug);
use Cwd qw(chdir);
$COLOR_REGISTERED ||= 0;
$Help = {
'?' => \"help",
'!' => "eval the rest of the line as perl",
a => "whois author",
autobundle => "wtite inventory into a bundle file",
b => "info about bundle",
bye => \"quit",
clean => "clean up a distribution's build directory",
# cvs_import
d => "info about a distribution",
# dump
exit => \"quit",
failed => "list all failed actions within current session",
fforce => "redo a command from scratch",
force => "redo a command",
h => \"help",
help => "overview over commands; 'help ...' explains specific commands",
hosts => "statistics about recently used hosts",
i => "info about authors/bundles/distributions/modules",
install => "install a distribution",
install_tested => "install all distributions tested OK",
is_tested => "list all distributions tested OK",
look => "open a subshell in a distribution's directory",
ls => "list distributions according to a glob",
m => "info about a module",
make => "make/build a distribution",
mkmyconfig => "write current config into a CPAN/MyConfig.pm file",
notest => "run a (usually install) command but leave out the test phase",
o => "'o conf ...' for config stuff; 'o debug ...' for debugging",
perldoc => "try to get a manpage for a module",
q => \"quit",
quit => "leave the cpan shell",
r => "review over upgradeable modules",
readme => "display the README of a distro woth a pager",
recent => "show recent uploads to the CPAN",
# recompile
reload => "'reload cpan' or 'reload index'",
report => "test a distribution and send a test report to cpantesters",
reports => "info about reported tests from cpantesters",
# scripts
# smoke
test => "test a distribution",
u => "display uninstalled modules",
upgrade => "combine 'r' command with immediate installation",
};
{
$autoload_recursion ||= 0;
#-> sub CPAN::Shell::AUTOLOAD ;
sub AUTOLOAD {
$autoload_recursion++;
my($l) = $AUTOLOAD;
my $class = shift(@_);
# warn "autoload[$l] class[$class]";
$l =~ s/.*:://;
if ($CPAN::Signal) {
warn "Refusing to autoload '$l' while signal pending";
$autoload_recursion--;
return;
}
if ($autoload_recursion > 1) {
my $fullcommand = join " ", map { "'$_'" } $l, @_;
warn "Refusing to autoload $fullcommand in recursion\n";
$autoload_recursion--;
return;
}
if ($l =~ /^w/) {
# XXX needs to be reconsidered
if ($CPAN::META->has_inst('CPAN::WAIT')) {
CPAN::WAIT->$l(@_);
} else {
$CPAN::Frontend->mywarn(qq{
Commands starting with "w" require CPAN::WAIT to be installed.
Please consider installing CPAN::WAIT to use the fulltext index.
For this you just need to type
install CPAN::WAIT
});
}
} else {
=10= |