On Thu, 2007-01-04 at 17:13 -0500, Sean P Quinlan wrote:
> And here is the relevant portions of my configuration file (located in
> conf.d/):
> <Perl>
> $Apache2::PerlSections::Save = 1;
> use CAS::Apache::Auth;
>
> # The default CAS client for the admin location
> $CAS_admin_client = 1;
> $Auth_admin = CAS::Apache::Auth->new({CLIENT_ID => $CAS_admin_client});
> </Perl>
Put that in a namespace so it won't get interpreted as a directive:
$My::Auth_admin = CAS::Apache::Auth->new({CLIENT_ID =>
$CAS_admin_client});
Then assign $My::Auth_admin instead of $Auth_admin.
I'm just guessing here, since I don't use PerlSections or method
handlers on instances, but that's what it looks like to me from the
docs.
> Oops, I'm calling the method instead of setting it as a handler.
> Perhaps setting it as a coderef? So I changed PerlAuthenHandler to:
> PerlAuthenHandler => \$Auth_admin->authen,
When you use it in a regular config directive, it gets treated as a
string. In a PerlSection, it is eval'ed as perl. In this context, I
think you'd need to change it to something like this:
PerlAuthenHandler => sub { $Auth_admin->authen },
or maybe even this:
PerlAuthenHandler => sub { CAS::Apache::Auth->authen($Auth_admin) },
- Perrin