You should look into CGI::Application, which tightly integrates HTML::Template into its core. Basically, with CGI::Application, each of your "faces" would be a runmode, and then your application has a "setup" method that helps define the flow of your application. Looking at the "setup" subroutine of a app built with CGI::Application, you can usually figure out what each "face" or runmode does.

The other advantage is the CGI::Application is a gentle introduction to OOP. You can easily create a "superclass" that holds methods that you share among different modules of your application- you might split your report functions from your file list functions, but you can then share methods among them simply via the superclass.

There are a lot of advantages to using this module- it forces you to code cleanly, you can easily change the functionality and templates used for an entire application without recoding, and it's mod_perl friendly, should your application ever reach that level.

Check it out!

-Any sufficiently advanced technology is
indistinguishable from doubletalk.


In reply to Re: Multiple template coordination using HTML::Template by Hero Zzyzzx
in thread Multiple template coordination using HTML::Template by ryan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.