Well, i was in a similar situation. I implemented a POP3/SMTP based WebMailer without using any framework (like CGI::Application(::Plus)). Everything was working but unclean. A year later i thought about including IMAP and NNTP as well. But i knew that my kernel was to unstructered, so i looked throught cpan and found CGI::Application(::Plus). I tried it and started reimplementing my webmailer. But i didn't like the fact, that i had to do the dispatching stuff (as you mentioned). Now I use Catalyst
(The Elegant MVC Web Application Framework :) ) which is really powerful and easy to use (thanks sri). Have a look at it.
Now I'm happy.