1 package B::Lint::Debug;
5 B::Lint::Debug - Adds debugging stringification to B::
9 This module injects stringification to a B::OP*/B::SPECIAL. This
10 should not be loaded unless you're debugging.
15 use overload '""' => sub {
21 use overload '""' => sub {
23 my $class = ref $self;
24 $class =~ s/\AB:://xms;
25 my $name = $self->name;
30 use overload '""' => sub {
32 my $class = ref $self;
33 $class =~ s/\AB:://xms;
34 my $name = $self->name;
35 "$class($name," . $self->sv . "," . $self->gv . ")";
44 print "AUTOLOAD $AUTOLOAD\n";
47 while ( my @stuff = caller $cx ) {
49 print "$cx: [@DB::args] [@stuff]\n";
50 if ( ref $DB::args[0] ) {
51 if ( $DB::args[0]->can('padix') ) {
52 print " PADIX: " . $DB::args[0]->padix . "\n";
54 if ( $DB::args[0]->can('targ') ) {
55 print " TARG: " . $DB::args[0]->targ . "\n";
56 for ( B::Lint::cv()->PADLIST->ARRAY ) {
57 print +( $_->ARRAY )[ $DB::args[0]->targ ] . "\n";