I'm now readying my first major (more than a couple dozen lines of code) module to CPAN. I used Log4Perl and a Log4Perl wrapper with some convenience methods I wrote to make it easy to debug and trace the execution of my code while writing it.
What's the best practice as far as leaving this code in the official CPAN release? On the one hand, I don't want to clutter up the code and require users to install Log4Perl and my wrapper for log commands that will be turned off by default for them anyway. On the other hand, I'd rather avoid having to adding/removing the necessary use and various log commands when it comes time to add a new feature or debug existing code.
I've never seen a CPAN module that was littered with debug statements so I'm thinking I should just pull out the Log4perl module and all related statements.
But maybe there is some way I can get the best of both worlds? Maybe just leave the logging code in there an comment them out?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
In reply to Leave log4perl debug code in cpan module? by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |