[Koha-devel] add the Smart::Comments perl module to Koha, a good idea?

Chris Cormack chrisc at catalyst.net.nz
Sun Jan 22 06:40:08 CET 2012


* Mason James (mtj at kohaaloha.com) wrote:
> 
> On 2012-01-21, at 3:48 AM, Galen Charlton wrote:
> 
> > Hi,
> > 
> > On Jan 20, 2012, at 2:59 AM, Mason James wrote:
> >> i think i'm gonna send a patch to add the S::C module as a Koha dependency, a good idea?
> > 
> > As an optional dependency, maybe.  But there's nothing stopping anybody from using it for their debugging now, right?
> > 
> > Smart::Comments is a source filter -- and consequently may cause a modest but measurable performance hit if it were enabled across the board -- and some cursory Googling suggests that it may not have played well with mod_perl in the past.  I don't know, and haven't yet tested, whether that's still the case, but I do think that should be checked before such a patch is accepted.
> > 
> > Thinking aloud, perhaps (for Debian and friends) maybe it belongs as a dependency brought in by a new koha-dev-tools package?
> > 
> > Regards,
> > 
> > Galen
> 
> 
> cool, thanks for the replies everyone :)
> 
> so, lets use both Smart::Comments and Data::Dumper
> 
> 
> hmmm, shall we start wrapping the loading of Koha debug modules in a 'if ($DEBUG) {use Smart::Comments}' type code block - as a performance tweak?
> 
> 
> would that work?

No because the use is called anyway, you can conditionally use a use
call. You would need to do require and import.

Chris


> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/


-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: </pipermail/koha-devel/attachments/20120122/f9930ee0/attachment.pgp>


More information about the Koha-devel mailing list