DB::Pluggable::Dumper on Github and CPAN
I recently blogged about extending the Perl debugger. Basically, if you use xx $some_var, you get love Data::Dumper output instead of the confusing debugger output:
DB<2> xx $shiny
{
foo => [
1,
2,
4
],
guess => sub {
my $x = shift @_;
return $x + 1;
},
this => "that",
uno => {
this => "that",
"what?" => {
this => "them"
}
}
}
You can fork it on github and clean up my awful code or install it from the CPAN when it's available.
In other news, if you ever extend the debugger, your code is going to look awful by default because there is just no way to get around that mess of global variables and action at a distance.
Thanx! It works great. I'm using it all the time now. There's a small warning at the startup though: "Subroutine DB::eval redefined at /home/local/apps/perl-5.10.1/lib/site_perl/5.10.1/DB/Pluggable/Dumper.pm line 38."
@Darko: yeah, there are still a few glitches with it. I'm working with Marcel to sort all of them out.
@Ovid: I just saw this new release: http://cpansearch.perl.org/src/MARCEL/DB-Pluggable-1.101050/Changes . You guys are pretty fast in killing bugs :)
@Darko: except that has a bug, too. Marcel and I have been chatting about it and will try to figure out a workaround. That was the route I had gone down to refactor things, but couldn't quite get it to work. Looks like he's hit the same wall. Working with the debugger is hell.