in reply to checking for preloaded modules

This wasn't your main question, but CGI::Application makes use of HTML::Template internally and it must export a re-useable error-handling routine.

If you aren't sure, msg AgentM or join the support mailing list.