John,

It does not look as if what you write below is true though.
I just tested with

PerlResponseHandler AM::TestStuff->handler

and

sub handler {
 my ($self,$r) = @_;
$r->print('$self is a [' . ref($self) . '] and contains [' . $self . "]\n");

[...]

and the result is
$self is a [] and contains [AM::TestStuff]

doesn't seem to be an object.
I think it is only the module's name you get in there.
So maybe you can save yourself some cpu cycles in future
(a pity though, it was elegant stuff).

I'll stick to my (unused) $self, though maybe I'll rename it to $classname, now that I know.

It was worth finding out for sure though.

André


John ORourke wrote:
André Warnier wrote:
In a similat setup, I successfuly use
my ($self, $r) = @_;
Colin Wetherbee wrote:
PerlAccessHandler JetSet::Handler->AccessHandler
PerlResponseHandler JetSet::Handler->ResponseHandler

The only down-side is that (AFAICR) it is creating a new object for each request - my handler is quite expensive to set up, so I have a persistent object and use method handlers like this:

package My::Handlers;
$My::Handlers::Persistent=My::Handlers->new();

sub response_handler { my ($self,$r)[EMAIL PROTECTED]; .... }
sub fixup_handler { my ($self,$r) = @_; .... }

and apache config:

PerlResponseHandler $My::Handlers::Persistent->response_handler
PerlFixupHandler $My::Handlers::Persistent->fixup_handler

cheers
John



Reply via email to