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*
After a few false starts and some googling - this is the method I have used and tested...
use C4::Debug; use if $debug, 'Data::Dumper' ; use if $debug, 'Smart::Comments' ; # use if $debug, 'YAML::Dumper; # etc....
Is there a better way than this?
A question from me too.. Is there a clever way to add this code to *just* Debug.pm which would enable D::D and S::C functionality to all perl files that 'use C4::Debug'? That would be the cleanest way, i think - but i don't know how to do this, or if it's possible in perl :/ anyone?