Hi! Please consider following me on twitter: @hanekomu.

CodeRepos ktkr!

I've moved most of my code to CodeRepos. Thanks to Yappo-san for the commit bit. Now every CodeRepos committer (that is, all the cool Japanese hackers and some gaijin) can patch my distros. Looking forward to it!

Tags: .

Write a comment | Bookmark and Share

posted at: 13:39 | path: /misc | permalink | 0 comments | 0 trackbacks

Perl debugger plugins with DB::Pluggable

I've released DB::Pluggable which adds plugin support to the debugger. There are quite a few good ~/.perldb ideas around, but they're not easy to combine because they often overwrite the same DB::* functions. This distribution tries to remedy this by moving functionality to plugins.

$ 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

DB::Pluggable was inspired by Andy Armstrong's journal entry about a debugger command that adds breakpoints for specific Test::Builder-based tests.

This distribution is very much in beta, so it's more like a proof of concept. Therefore, not all hooks imaginable have been added, only the ones to make this demo work. If you want more hooks or if the current hooks don't work for you, let me know.

Write a comment | Bookmark and Share

posted at: 11:45 | path: /dev | permalink | 0 comments | 0 trackbacks