Skip Menu |

This queue is for tickets about the Apache-DBILogger CPAN distribution.

Report information
The Basics
Id: 25158
Status: open
Priority: 0/
Queue: Apache-DBILogger

People
Owner: Nobody in particular
Requestors: GWOLF [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.93
Fixed in: (no value)



Subject: Incompatible with Apache/mod_perl 2.x
Apache::DBILogger does not work under mod_perl 2 - The solution seems to be quite trivial, I'm attaching a patch that -at least for a simple test- allows me to use Apache::DBILogger from both versions, by just trying to include the right module (Constants.pm vs. Const.pm) inside evals.
Subject: Apache-DBILogger.diff
--- DBILogger.pm.orig 2007-02-26 10:56:04.000000000 -0600 +++ DBILogger.pm 2007-02-26 10:57:45.000000000 -0600 @@ -2,10 +2,19 @@ require 5.004; use strict; -use Apache::Constants qw( :common ); use DBI; use Date::Format; +BEGIN { + eval "use Apache::Constants qw(:common)"; + if ($@) { + eval "use Apache::Const qw(:common)"; + if ($@) { + die "Not under Apache, not under Apache2?\n$@"; + } + } +} + $Apache::DBILogger::revision = sprintf("%d.%02d", q$Revision: 1.20 $ =~ /(\d+)\.(\d+)/o); $Apache::DBILogger::VERSION = "0.93";
Ugh, turns out not only that this bug was already opened, but it was opened by _me_! :) I'm closing the first version, as the later one (#26876) has a patch fixing the problem.
Subject: Re: [rt.cpan.org #25158] Incompatible with Apache/mod_perl 2.x
Date: Tue, 1 May 2007 22:15:16 -0700
To: bug-Apache-DBILogger [...] rt.cpan.org
From: Ask Bjørn Hansen <ask [...] perl.org>
Heh, funny! I had just looked at the list recently and wondered if this would be my first module not updated for 10 years. I guess not! :-) I'll get the patch applied and a new release out later in the week, thanks! - ask
CC: GWOLF [...] cpan.org
Subject: Re: [rt.cpan.org #25158] Incompatible with Apache/mod_perl 2.x
Date: Wed, 2 May 2007 09:31:05 -0500
To: "ask [...] perl.org via RT" <bug-Apache-DBILogger [...] rt.cpan.org>
From: Gunnar Wolf <gwolf [...] gwolf.org>
ask@perl.org via RT dijo [Wed, May 02, 2007 at 01:15:39AM -0400]: Show quoted text
> Heh, funny! I had just looked at the list recently and wondered if > this would be my first module not updated for 10 years. I guess > not! :-) > > I'll get the patch applied and a new release out later in the week, > thanks!
Heh! Sorry for breaking your record ;-) In any case, I didn't extensively check my patch - The module seems easy enough for me to be confident, but double-check I'm not doing anything too silly. Also, the style is not the cleanest, but I wanted to make it as unintrusive as possible. As the author, maybe you can clean a bit the logic. Greetings, -- Gunnar Wolf - gwolf@gwolf.org - (+52-55)5623-0154 / 1451-2244 PGP key 1024D/8BB527AF 2001-10-23 Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF