>>>>> "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:
Matt> I guess one important question is - why do we have to call SetHandler for
Matt> PerlHandlers and not for any of the other handler phases. For all the
Matt> other phases Apache/mod_perl automatically figures out if there's a
Matt> handler installed and either runs perl code, or lets apache do its
Matt> work. Why can't PerlHandler do the same? (as you can tell - I haven't dug
Matt> into the internals of this - but I am curious).
I've been pondering this for quite some time, and was considering
a "magic mime type" that I'd deal with in the fixup handler... if
the MIME type assigned by mod_mime or anything else in the mime phase
is "text/html;PerlHandler=Apache::Registry", then the generic
fixup handler would patch that to "text/html" and push a PerlHandler
of Apache::Registry.
That way you could do this:
<files *.html>
SetType text/html;PerlHandler=HTML::Mason
</files>
<files *.pl>
SetType text/plain;PerlHandler=Apache::Registry
</files>
<files static/*.html>
SetType text/html
</files>
Syntax is probably off... but I think you can see where I'm going with
this. Bring the MIME type to mean both the "real" mime type as well
as a PerlHandler if needed. I'm sure it's a 15 line
FixupHandler... just haven't had time to tear down part of my site to
test. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!