Hi there,

I've been getting frustrated by the mandatory warning created by 'use
constant' under mod_perl, caused by constant subroutines being redefined
when imported. In particular, with Archive::Zip this was adding hundreds of
lines to my log every restart.

I've edited constant.pm and Exporter.pm to avoid redefining subroutines that
are already in the calling package. In constant.pm I add:
if (!(defined &{"${pkg}::$name"})) {
around the bit in sub import {} that actually populates the namespace of the
caller. The approach in Exporter.pm is similar.

Is there any downside to doing this? Should it be added to the standard
distribution (or has it been added to 5.6 already?--I can't run 5.6 because
to many modules I use don't work, Apache::DB being the most problematic)?

--------
[EMAIL PROTECTED]


Reply via email to