Shaneful has asked for the wisdom of the Perl Monks concerning the following question:

I have a mod_perl handler setup (Apache2) for <location />, it should serve all pages except for 1 that is a cgi-script.
when this uri is called I can return undef and the cgi script is served as standard html.(preview below)
How do I get the mod_perl to serve the cgi script?
code snippet
next unless $uri =~ "/test.pl"; warn "uri $uri matched $_\n"; $r->handler('cgi-script'); $global_status = Apache::DECLINED; return undef; }
html view of the perl script
#!/usr/bin/perl print "Content-type:text/xml\n\n"; print "This is a CGI script!\n";

Replies are listed 'Best First'.
Re: Getting mod_perl Handler to serve cgi sciprt
by mpeters (Chaplain) on Mar 18, 2005 at 22:53 UTC
    The simplest way is to tell apache to not use mod_perl on that script.
    <File test.pl> SetHandler default </File>
    Or something like that.
      Actually, you'd want to
      SetHandler cgi-script
        You're right of course.
      Um, you might check that again
        Thank you for your help I figured it out.