DB::Pluggable::BreakOnTestNumber - Debugger plugin to break on Test::Builder-based tests
$ cat ~/.perldb use DB::Pluggable; use YAML; $DB::PluginHandler = DB::Pluggable->new(config => Load <<EOYAML); global: log: level: error plugins: - module: BreakOnTestNumber EOYAML $DB::PluginHandler->run; $ perl -d foo.pl Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. 1..9 ... DB<1> b #5 DB<2> r
This debugger plugin extends the debugger's b command - used to set breakpoints - with the ability to stop at a specific test number. Andy Armstrong had the idea and wrote the original code, see http://use.perl.org/~AndyArmstrong/journal/35792.
b
Registers the hooks.
Hook handler for the plugin.init hook. Does some initializations, surprisingly.
plugin.init
Hook handler for the db.cmd.b hook. Checks whether the command is of the form b #12 or b #12, 34, .... If so, it sets breakpoints to break as soon as the code leading up to the given test is encountered. For example, given b #12, it breaks as soon as test 11 has been finished. If it has handled the command, it returns the DB::Pluggable::Constants HANDLED. If not, it returns DECLINED.
db.cmd.b
b #12
b #12, 34, ...
HANDLED
DECLINED
If it handles the command, it enables the watchfunction().
watchfunction()
Hook handler for the db.watchfunction hook. Checks the current test number from Test::Builder and instructs the debugger to stop if an appropriate test number has been reached.
db.watchfunction
DB::Pluggable::BreakOnTestNumber inherits from Hook::Modular::Plugin.
The superclass Hook::Modular::Plugin defines these methods and functions:
new(), assets_dir(), class_id(), conf(), decrypt_config(), dispatch_rule_on(), do_walk(), init(), load_assets(), log(), plugin_id(), rule(), walk_config_encryption()
The superclass Class::Accessor::Fast defines these methods and functions:
make_accessor(), make_ro_accessor(), make_wo_accessor()
The superclass Class::Accessor defines these methods and functions:
_carp(), _croak(), _mk_accessors(), accessor_name_for(), best_practice_accessor_name_for(), best_practice_mutator_name_for(), follow_best_practice(), get(), mk_accessors(), mk_ro_accessors(), mk_wo_accessors(), mutator_name_for(), set()
If you talk about this module in blogs, on del.icio.us or anywhere else, please use the dbpluggable tag.
dbpluggable
This document describes version 0.01 of DB::Pluggable::BreakOnTestNumber.
No bugs have been reported.
Please report any bugs or feature requests to <bug-db-pluggable@rt.cpan.org>, or through the web interface at http://rt.cpan.org.
<bug-db-pluggable@rt.cpan.org
See perlmodinstall for information and options on installing Perl modules.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
Copyright 2007-2008 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DB::Pluggable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DB::Pluggable
CPAN shell
perl -MCPAN -e shell install DB::Pluggable
For more information on module installation, please visit the detailed CPAN module installation guide.