# Hope that makes sense, my head is a bit off:-) -- AK
use vars qw{ @All $VERSION };
-$VERSION = sprintf "%.6f", substr(q$Rev: 922 $,4)/1000000 + 5.4;
+$VERSION = sprintf "%.6f", substr(q$Rev: 1486 $,4)/1000000 + 5.4;
# CPAN::Queue::new ;
sub new {
join("",map {sprintf " %s\[%s]\n",$_->{qmod},$_->{reqtype}} @All),
join("",map {sprintf " %s\[%s]",$_->[0],$_->[1]} @what)
)) if $CPAN::DEBUG;
+ unless (defined $what[0][1]) {
+ # apparently it was not the Shell that sent us this enquiry,
+ # treat it as commandline
+ $what[0][1] = "c";
+ }
my $inherit_reqtype = $what[0][1] =~ /^(c|r)$/ ? "r" : "b";
WHAT: for my $what_tuple (@what) {
my($what,$reqtype) = @$what_tuple;
# CPAN->debug("i[$i]this[$All[$i]{qmod}]what[$what]") if $CPAN::DEBUG;
if ($All[$i]{qmod} eq $what){
$jumped++;
- if ($jumped > 100) { # one's OK if e.g. just
- # processing now; more are OK if
- # user typed it several times
+ if ($jumped > 25) { # one's OK if e.g. just processing
+ # now; more are OK if user typed
+ # it several times
+ my $sleep = sprintf "%.1f", $jumped/10;
$CPAN::Frontend->mywarn(
-qq{Object [$what] queued more than 100 times, ignoring}
+qq{Warning: Object [$what] queued $jumped times, sleeping $sleep secs!\n}
);
- next WHAT;
+ $CPAN::Frontend->mysleep($sleep);
+ # next WHAT;
}
}
}