Have a look at CGI::Application::Dispatch. It works pretty much exactly like you describe. It can be used as a mod_perl handler if you use mod_perl, or it can be used in a simple CGI script if you don't use mod_perl.

As for the three questions at the bottom: