[Koha-devel] A solution to add debugger functionality most koha *.pl scripts, thoughts please?

2009-02-09 Thread Mason James
Hi Koha developers, I have been talking with John and Paul at BibLibre for some months now about a correct way to add Data::Dumper, Smart::Comments, insert::your::favorite::debugger stuff to the Koha perl files *once and for all* After a few false starts and some googling - this is the metho

Re: [Koha-devel] A solution to add debugger functionality to most koha *.pl scripts, thoughts please?

2009-02-09 Thread Mason James
On 2009/02/10, at 6:01 PM, Mason James wrote: > Hi Koha developers, > > I have been talking with John and Paul at BibLibre for some months > now about a > correct way to add Data::Dumper, Smart::Comments, > insert::your::favorite::debugger stuff > to the Koha perl files *once and for all* > >

Re: [Koha-devel] A solution to add debugger functionality to most koha *.pl scripts, thoughts please?

2009-02-09 Thread John Beppu
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, @_); } Th

Re: [Koha-devel] A solution to add debugger functionality to most koha *.pl scripts, thoughts please?

2009-02-09 Thread Mason James
On 2009/02/10, at 7:30 PM, John Beppu wrote: > Give C4::Debug an import() function like this: > > sub import { > if ($debug) { > require Smart::Comments; > Smart::Comments->import; > require Data::Dumper; > Data::Dumper->impo

Re: [Koha-devel] A solution to add debugger functionality to most koha *.pl scripts, thoughts please?

2009-02-09 Thread John Beppu
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 wrote: > Give C4::Debug an import() function like this: > > sub import { > if ($debug) { >