5 $VERSION = sprintf "%.6f", substr(q$Rev: 561 $,4)/1000000 + 5.4;
6 # module is internal to CPAN.pm
30 #-> sub CPAN::Debug::debug ;
33 my($caller,$func,$line,@rest) = caller(1); # caller(0) eg
36 ($caller) = caller(0);
38 $arg = "" unless defined $arg;
39 pop @rest while @rest > 5;
40 my $rest = join ",", map { defined $_ ? $_ : "UNDEF" } @rest;
41 if ($CPAN::DEBUG{$caller} & $CPAN::DEBUG){
42 if ($arg and ref $arg) {
43 eval { require Data::Dumper };
45 $CPAN::Frontend->myprint($arg->as_string);
47 $CPAN::Frontend->myprint(Data::Dumper::Dumper($arg));
50 $CPAN::Frontend->myprint("Debug($caller:$func,$line,[$rest]): $arg\n");