The advice from
merlyn about testing the different parts of the app separately is good. For the actual controller part, if you're using CGI::Application, I found the approach described
here worked very well for me. Otherwise, Mechanize is a good choice. You will have to include some setup to put fake data into your database. This sounds like a lot of work, but it's really worth it to have piece of mind. WIth a good set of tests, you can instantly tell if your code is still working after you make a change somewhere.