Author image Curtis "Ovid" Poe

NAME

DB::Pluggable::Dumper - Add 'xx' dumper to debugger

VERSION

Version 0.01

SYNOPSIS

In your $HOME/.perldb:

    #!/usr/bin/env perl

    use DB::Pluggable;
    use YAML;

    $DB::PluginHandler = DB::Pluggable->new( config => Load <<'END');
    global:
      log:
        level: error

    plugins:
      - module: Dumper
    END

    $DB::PluginHandler->run;

DESCRIPTION

This module adds the xx command to the debugger. It's like the x command, but outputs pretty Data::Dumper format. Here's the output of a data structure with 'x':

    auto(-2)  DB<2> x $before
    0  HASH(0x100e7e8f0)
       'aref' => ARRAY(0x1009000d8)
          0  1
          1  2
          2  4
       'guess' => CODE(0x100829568)
          -> &main::testit in run.pl:3-6
       'uno' => HASH(0x100803108)
          'this' => 'that'
          'what?' => HASH(0x100e3d508)
             'this' => 'them'

Here's the same data structure with 'xx':

    auto(-1)  DB<3> xx $after
    {
      aref => [
        1,
        2,
        4
      ],
      guess => sub {
          my $x = shift @_;
          return $x + 1;
      },
      uno => {
        this => "that",
        "what?" => {
          this => "them"
        }
      }
    }

Which would you rather debug?

TODO

SEE ALSO

NOTE

This code is an awful hack because the perl debugger (perl5db.pl) is an awful hack. My apologies.

AUTHOR

Curtis "Ovid" Poe, <ovid at cpan.org>

BUGS

Please report any bugs or feature requests to bug-db-pluggable-dumper at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DB-Pluggable-Dumper. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc DB::Pluggable::Dumper

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2010 Curtis "Ovid" Poe, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 135:

Non-ASCII character seen before =encoding in 'Grünauer'. Assuming UTF-8

Around line 143:

You forgot a '=back' before '=head1'

Around line 148:

=back without =over