Skip Menu |

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

Report information
The Basics
Id: 3674
Status: stalled
Priority: 0/
Queue: Apache-AuthCookieDBI

People
Owner: matisse [...] spamcop.net
Requestors: william [...] knowmad.com
Cc:
AdminCc:

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



Subject: Errors in example code?
I'm new to mod_perl coding so am not sure if I'm misreading the cookbook or whether I've got something more serious happening. I followed the code in the eg/public-pl/login.pl example which extracts the destination and authcookiereason from the args method. It turns out I was having authcookiereason set to destination when first coming to my form (i.e., both arguments were empty). Page 87 of Mod_perl Cookbook says that args is a method that returns the string following the ?. The example code is calling it as though it were a function that returns the value of a key. It apparently also sets the string which is the behavior I appear to be getting. I changed that code to look like the following (copied from Apache::AuthCookie) and am getting the expected behavior: if (my %args = $r->args()) { $destination = $args{ 'destination' }; $authcookiereason = $args{ 'AuthCookieReason' }; } Thanks, William