You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kevin Appel <ka...@tgic.com> on 2006/11/08 18:42:57 UTC

Apache::AuthDBI package

Is anyone using the Apache::AuthDBI package?  I am currently using version
1.04 and Im confused about the DEBUG entry in the code, specifically the
debug function.  By default, the DEBUG is set to 0 which means there is no
debugging, 1 will show cache hits, and 2 is full blown debugging.  However,
the comparision function inside the debug function will never allow the
DEBUG 1 to be set correctly, and to have no debugging, the debug value needs
to be sent higher than 2.

Inside the AuthDBI.pm, I have changed the following:

sub debug {
    print STDERR "$_[1]\n" if $_[0] >= $Apache::AuthDBI::DEBUG;
}

to

sub debug {
    print STDERR "$_[1]\n" if $_[0] <= $Apache::AuthDBI::DEBUG;
}

With this change, the debug now works with the levels of 0, 1, and 2.

Can someone please confirm that my understanding is correct and if anyone
else has come across this before?

Thanks,

Kevin

-----------------------------------------
The information contained in this email and any attachments may be
privileged and/or confidential and protected from disclosure.  It
is intended solely for the use of the recipient(s) to whom it is
addressed, or an employee or agent responsible for delivering this
message to the intended recipient(s).  You are hereby notified that
any dissemination, distribution, copying or other use of this
communication is strictly prohibited.  If you have received this
communication in error, please notify the sender by reply email and
delete this email and all attachments from your system.  Thank you.


Re: Apache::AuthDBI package

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Kevin Appel wrote:
> sub debug {
>     print STDERR "$_[1]\n" if $_[0] >= $Apache::AuthDBI::DEBUG;
> }
> 
> to
> 
> sub debug {
>     print STDERR "$_[1]\n" if $_[0] <= $Apache::AuthDBI::DEBUG;
> }
I'll have a look tonight and see.  I don't however feel the need to release 1.06 for this fix
right away since its just debugging and 0 aka off works. I'd like to get some actual dev work
into the next release such as moving the test framework to Apache-Test and writing some for Auth::DBI
especially given the recent string of SNAFUs in it.

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide....

Re: Apache::AuthDBI package

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Kevin Appel wrote:
> Is anyone using the Apache::AuthDBI package?  I am currently using version
> 1.04 and Im confused about the DEBUG entry in the code, specifically the
> debug function.  By default, the DEBUG is set to 0 which means there is no
> debugging, 1 will show cache hits, and 2 is full blown debugging.  However,
> the comparision function inside the debug function will never allow the
> DEBUG 1 to be set correctly, and to have no debugging, the debug value needs
> to be sent higher than 2.
> 
> Inside the AuthDBI.pm, I have changed the following:
> 
> sub debug {
>     print STDERR "$_[1]\n" if $_[0] >= $Apache::AuthDBI::DEBUG;
> }
> 
> to
> 
> sub debug {
>     print STDERR "$_[1]\n" if $_[0] <= $Apache::AuthDBI::DEBUG;
> }
Yes, you are absolutely correct.

Committed revision 8059.

At some point it will be in 1.06, but I'd like to get some dev time in 
first.

Thanks.

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.