mod_perl2 and request paths

Simon Wistow simon at thegestalt.org
Sat Feb 9 15:14:49 GMT 2008


So, I have installed a mod_perl2 handler in a directory such that 
anything under

	http://example.com/myhandler/

gets called through it.

What I want to know is, if 

	http://example.com/myhandler/sub_dir/file.html

gets called, how do programatically I tell that I was installed under 

	/myhandler

I had one method that walked back up the file path until it reached a 
real directory but that doesn't work if I actually *have* a real 
directory under your 'handled' directory (i.e if 'sub_dir' actually 
exists).

Surely this can't be *that* hard - it seems like a fairly obvious thing 
to want to do. 

Simon





More information about the london.pm mailing list