Fuck, there are configuration directive and I have no ideas how to manipulate this from runtime.

Meditating the Apache2::Const module got no results how to revert the default-handler :(
Seems that apache "Handlers" are used to replace only "default-handler"s


I've tried to set PerlResponseHandler at runtime in PerlTransHandler which rises before one.

Apache config:
<VirtualHost> SetHandler perl-script PerlTransHandler My::Apache::Rewrite </VirtualHost>

My/Apache/Rewrite.pm
-------------------------
package My::Apache::Rewrite; use strict; use warnings; use Apache2::RequestRec (); use Apache2::Const -compile => qw(FORBIDDEN DECLINED OK DONE); sub handler { my $r = shift; unless(($r->uri ne '/' && !$r->args) && (-d $r->filename || -f $r- +>filename)) { $r->set_handlers(PerlResponseHandler => 'My::Apache::Main'); } return Apache2::Const::OK; } 1;
No results because main handler is always set :(

In reply to Re^2: mod_perl how to process static content by atento
in thread mod_perl how to process static content by atento

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.