Bug#680321: libgeo-ip-perl: noise in error log due to use of constant subroutines

Raphael Geissert geissert at debian.org
Thu Jul 5 00:31:13 UTC 2012


Package: libgeo-ip-perl
Version: 1.38-1
Severity: important

Hi,

Whenever Geo::IP is used with mod_perl's PerlRun handler, Apache's error log 
will be populated by a dozen of warnings *on every request*.

The warnings go on like this:
Constant subroutine 
ModPerl::ROOT::ModPerl::PerlRun::path_to_perl_file_2epl::GEOIP_UNKNOWN_SPEED 
redefined at /usr/lib/perl5/ModPerl/Util.pm line 69.

Now, I couldn't find any way *at all* to disable those warnings. -X, no 
warnings, etc; nothing works.

According to a thread I found in an apache ML [1], there's some XS code that 
could be used that does The Right Thing. However, for an unknown reason the 
PP code is used (as demonstrated by the error log and the surrounding code 
in ModPerl::Util::unload_package().

Perhaps somebody reading this message knows why it wasn't used or what the 
status of that alledgedly included code is.

In any case, it is fairly easier to avoid defining those constant 
subroutines. Attached diff turns those constant subroutines into non-constant 
subroutines.
I know that it could have a performance impact, but at least when using 
Geo::IP under PerlRun, it is the only sane way to use an application without 
filling the /var/log partition.

Feel free to contact upstream and find an alternative solution.

P.S. how about a backport of wheezy's version to squeeze, for IPv6 support?

Thanks! 

[1]http://mail-archives.apache.org/mod_mbox/perl-
modperl/200410.mbox/%3C1096870543.13046.30.camel at ice.staff.netspace.net.au%3E 

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-constants.diff
Type: text/x-patch
Size: 2129 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20120704/d0de7694/attachment.bin>


More information about the pkg-perl-maintainers mailing list