[Koha-devel] A solution to add debugger functionality to most koha *.pl scripts, thoughts please?
Mason James
mason.loves.sushi at gmail.com
Tue Feb 10 18:38:04 CET 2009
On 2009/02/10, at 8:15 PM, John Beppu wrote:
> Also, if you want to be able to just type "Dumper" (instead of
> Data::Dumper::Dumper), add "Dumper" to the list of symbols that
> C4::Debug exports.
>
> On Mon, Feb 9, 2009 at 10:30 PM, John Beppu
> <john.beppu at liblime.com> wrote:
> Give C4::Debug an import() function like this:
>
> sub import {
> if ($debug) {
> require Smart::Comments;
> Smart::Comments->import;
> require Data::Dumper;
> Data::Dumper->import;
> }
> C4::Debug->export_to_level(1, @_);
> }
>
> That should do the trick.
>
Woo, this is all new stuff for me.
I'll play about and test this code of yours during my work week, and
read up on the OO->import example you gave.
I aim to send in a patch based on your code in the next few days.
Thanks again John!
More information about the Koha-devel
mailing list