I use AUTOLOAD when templating too.
I find that when building an application with CGI::Application, CGI::Session, and HTML::Template I have two types of subroutines:
- Those that exist to do something, view or update a database.
- Those that just exist to populate a couple of pieces of information on a static page, like a FAQ.
The second set of subroutines I handle by having an AUTOLOAD test to see if the application was called with a run mode for which there exists a template. If so it just populates it with "standard" things and returns it.
|