jbenjore/Enbugger — pull request #3 by rocky (2012-01-16 17:24:06+00:00)
Title: trepan plugin updates

Hi -

A couple more patches to consider for the *trepan.pm* plugin.

The first patch "Correct how writes work" is a bug fix. *Devel::Trepan* handles output differently than *perl5db* and I previously just had cut and pasted the *perl5db* code. My bad.

The second patch is a slight feature improvement for *Devel::Trepan*. The records why you are in the debugger, for example:

1. you were a stepping/nexting commands
2. you hit a temporary breakpoint
3. you hit a perminant breakpoint
4. a signal was handled
5. a fatal exception (post-mortem debugging)

To this list of events I had added an explicit call to the debugger, that is `Enbugger->stop`. The second patch just notes this event properly.

The third patch is to make calling the debugger from inside a *Devel::REPL* shell work slightly better. In particular it populates the `@DB:dbline` array so that inside the debuger you see what the eval string that is being run. The *Devel::REPL* plugin does this by setting global `$DB::eval_string` for the plugin to pick up and use. Also I set `$^P` to save source code lines which was missing before.