5 $VERSION = sprintf "%.2f", substr(q$Rev: 299 $,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 pop @rest while @rest > 5;
39 my $rest = join ",", map { defined $_ ? $_ : "UNDEF" } @rest;
40 if ($CPAN::DEBUG{$caller} & $CPAN::DEBUG){
41 if ($arg and ref $arg) {
42 eval { require Data::Dumper };
44 $CPAN::Frontend->myprint($arg->as_string);
46 $CPAN::Frontend->myprint(Data::Dumper::Dumper($arg));
49 $CPAN::Frontend->myprint("Debug($caller:$func,$line,[$rest]): $arg\n");