in reply to mod_perl question

Don't play games with your live server. It's easy to start a testing server on a separate port like 8080 and play with mod_perl there. This too is covered in the docs at perl.apache.org.

Despite attempts to handle as broad a range of scripts as possible, Apache::PerlRun is still just a compatibility layer. There are plenty of things you could do in your code that will work fine under CGI but fail with PerlRun.