5 $VERSION = sprintf "%.2f", substr(q$Rev: 286 $,4)/100;
6 # module is internal to CPAN.pm
29 #-> sub CPAN::Debug::debug ;
32 my($caller,$func,$line,@rest) = caller(1); # caller(0) eg
35 ($caller) = caller(0);
37 $arg = "" unless defined $arg;
38 my $rest = join "|", map { defined $_ ? $_ : "UNDEF" } @rest;
39 if ($CPAN::DEBUG{$caller} & $CPAN::DEBUG){
40 if ($arg and ref $arg) {
41 eval { require Data::Dumper };
43 $CPAN::Frontend->myprint($arg->as_string);
45 $CPAN::Frontend->myprint(Data::Dumper::Dumper($arg));
48 $CPAN::Frontend->myprint("Debug($caller:$func,$line,[$rest]): $arg\n");