----- Original Message ----- 
From: "Perrin Harkins" <[EMAIL PROTECTED]>
> On Mon, 2003-06-02 at 15:19, Issac Goldstand wrote:
> > No - this is at startup.  It's also, to the best of my knowledge, the
*only*
> > way to push handlers onto a dynamic URL (eg, where the URL is a
variable) -
> > which is what I'm trying to do.
>
> I was referring to the $r->push_handlers method which you can use when
> handling a request.
>
> >
> > This worked fine when it was just:
> > PerlHeaderParserHandler => __PACKAGE__."::some_handler";
> >
> > Now, I'm realizing it should be something more akin to:
> >
> > PerlHeaderParserHandler => ref($self)."->some_method";
> >
> > But even that's not working...
>
> That doesn't look like the syntax in the docs:
> http://perl.apache.org/docs/1.0/guide/config.html#Perl_Method_Handlers
>
> Or here:
> http://perl.apache.org/docs/1.0/guide/method_handlers.html
>
> If you really want an object method and not a class method, you need to
> do something like this:
>
> PerlHeaderParserHandler => sub {
>          my $r = shift;
>          $self->some_method($r);
>      }
Right - for $r->push_handlers, I  do that:.

$r->push_handlers("PerlFixupHandler",sub {return $self->uf_handler(@_);});
# A lot more elegant than the example in the Guide, IMHO

But that's not what's needed for Apache::ReadConfig, I think - Here, we
don't expect a sub reference, but rather the *name* of the routine (in the
Apache::ReadConfig namespace) which we want to run...  I'm still
experimenting.

  Issac

Reply via email to