I am having trouble getting pnotes to work and wonder if there is
something obvious I am missing. in PerlAuthenHandler I have gone back
to the Apache man page and tried to recreate the example given there but
to no avail. Below is the code:
package My::User;
sub handler{
my $r = new Apache::Request(shift);
$r->log_error("Are we actually here?");
$r->pnotes("MY_HANDLER" => [qw(one two three)]);
}
# seperate file
package My::Main;
sub handler{
my $r = new Apache::Request(shift);
my $var = $r->pnotes("MY_HANDLER");
$r->log_error("This is var $var->[0]");
}
....in httpd.conf
<Location />
SetHandler perl-script
AuthType test
AuthName test
PerlAuthenHandler My::User
require valid-user
PerlHandler My::Main
</Location>
when I check the error log it is hitting the My::User::handler but
nothing is returned to $var in My::Main. if i just check $r->pnotes()
it returns an empty hash ref.
On another note i originally had My::User::handler named
My::User::authenticate but when called from httpd.conf I got an error
"Could not locate object method authenticate via package My::User."
even though I did preload both My::Main and My::User in startup.pl and
also added a PerlModule My::User to httpd.conf just to be sure. perhaps
the two are related but I cannopt figure out either for the life of me.
any help would be greatly appreciated.
OS RH7.0
apache 1.3.14
mod_perl 1.24_01
php/4.03
mod_ssl/2.71
openSSL/0.9.6