Why is RecuestRec::path_info sometimes empty?
Worik Stanton <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
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
[email protected] 021-1680650, (03) 4821804
Aotearoa (New Zealand)
signature.asc
(application/pgp-signature, 538 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJToifbAAoJEDgltBsVWtVcvSkIALBXWYahFAbaDrHAmL9IJaLS O28IZP7JJe+ukYqh/jlqectROPiZQOirpmVbpWhNr3Qd3Tex6G440quJeCjB4gc6 DxJFLav5fg3uTw9XWTjuOkqOF4U8oZtOa5yrL9uAiB/LMSkOMgamu/n2uUh5tm+A uK6zsCwV4d/utKSmWR4FWqCtIVWcC7uRaFV49HZyQCZ0b93DXRsgJOZKPsmZ4KGY h3DKH5Qvpb4/x04Df7NiE+SPK6jjl3PPL/KmY2wwUuw7Od/fOzzE1Mp6TQ98suyW pua3k/RjRkViASrOmxDK2hXY0d19LKOX5MG4TO+9UCZmlfWrrdvsflLbCQMzGUI= =fT6Z -----END PGP SIGNATURE-----