FAQ
In my handler I call $r->path_info to determine the path used to call my
script.

I am trying to have a test version of my code using the same module but
which reads different data based on the path.

So I have:


<Location /MyPackage2>
     SetHandler perl-script
     PerlResponseHandler Apache::MyPackage::FrontEnd2
</Location>
<Location /MyPackage2Test>
     SetHandler perl-script
     PerlResponseHandler Apache::MyPackage::FrontEnd2
</Location>

In FrontEnd2....


sub handler {
     my $r = shift;
     warn $r->path_info;
     if($r->path_info =~ /test/i){
         ## Load test data
     }else{
        ## Load real data
     }

This works for another package I have exactly like this, but in this
case $r->path_info is empty.

I am stumped.

Worik

--
The only true evil is turning people into things....
                                          Granny Weatherwax
        worik.stanton@gmail.com 021-1680650, (03) 4821804
                           Aotearoa (New Zealand)

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedJun 18, '14 at 11:59p
activeJun 18, '14 at 11:59p
posts1
users1
websiteperl.apache.org

1 user in discussion

Worik Stanton: 1 post

People

Translate

site design / logo © 2018 Grokbase