Subject: | Bug with DEBUG in AuthDBI 1.05 |
Date: | Fri, 15 Dec 2006 17:52:01 -0800 |
To: | <bug-Apache-DBI [...] rt.cpan.org> |
From: | "mdr" <mrogoff [...] yahoo.com> |
From the documentation:
To enable debugging the variable $Apache::AuthDBI::DEBUG must be set. This can
either be done in startup.pl or in the user script. Setting the variable to 1,
just reports about a cache miss. Setting the variable to 2 enables full debug
output.
I recently installed this module (it's great) but I found that I was getting
full debug output even though I didn't set the DEBUG variable. Even setting it
to 0 didn't help.
I took a peek at the code and saw what I think is a bug:
sub debug {
print STDERR "$_[1]\n" if $_[0] >= $Apache::AuthDBI::DEBUG;
}
Callers of debug look like this:
debug (1, "==========\n$prefix request type = >$type<");
So it seems to me that >= should be <= in the debug() subroutine. I fixed this
in my module and now the DEBUG variable behaves as it should.
Thanks!