perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject Re: unsetting PerlTransHandler
Date Thu, 14 Aug 2003 10:42:57 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 14 August 2003 12:34, Frank Maas wrote:
> > and want to unset the TransHandler inside the <Location>.
> > How to do that?
>
> AFAIK: not. The TransHandler is the first to be called and cannot appear
> inside a container (ref. ModPerl cookbook). The only thing I can think of,
> and in fact implemented this, to make the TransHandler URI-aware and
> return immediately if the uri is something you do not want to be touched
> by the TransHandler.

Yes, I've implemented it also that way. But I thought <Location> acts on the 
URI and in principle there can be a <Location>-specific transhandler. I'm 
wondering why it is impossible?

For now I have implemented that particular case by

PerlTransHandler MyPackage::transhandler
<Location ...>
PerlHandler MyPackage::handler
</Location>

package MyPackage;

sub transhandler {
... 
return DECLINED
  if(grep {$_ eq __PACKAGE__.'::handler'} @{$r->get_handlers('PerlHandler')});
...
}

i.e. if my handler is installed return DECLINED.

Torsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/O2e0wicyCTir8T4RAjpXAKC8qRHIrQXxIA3O1RP3BnC40LcVqgCgy+eS
c+edNr0sMUM+tq0jmICq39Q=
=PnAk
-----END PGP SIGNATURE-----

Mime
View raw message