[Koha-devel] A solution to add debugger functionality most koha *.pl scripts, thoughts please?
Mason James
mason.loves.sushi at gmail.com
Tue Feb 10 06:01:06 CET 2009
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....
It's short, sweet and works a treat ;)
I currently waste much time every day adding/removing 'use
Data::Dumper/use Smart::Comments' from my files when debugging and
then committing patches to koha.org
Can we agree to add this code (or something similar) to most *.pm and
*.pl files?
Is there a better way than this?
Is this a bad way?
Any improvements or corrections i don't realize?
What do other developers do to get around this laborious issue?
FYI: this small fix (should it be accepted), will resolve one of my
biggest pet-annoyances of the Koha project!
Cheers, Mason.
More information about the Koha-devel
mailing list