Greetings Monks,

Im working on adding new features to a database (mysql) driven web application. Im using CGI::Application and HTML::Template, in a MVC architecture.

While looking at the application, I found that there are few 'run-modes', which are common to most of the 'modules', such as:

  1. View List Screen
  2. View Create Screen
  3. View Edit Screen
I plan to avoid coding these common stuffs, by implementing these runmodes/methods, once, in a parent class. The parent class, with the help of an all-knowing model class, introspects the table and gets the data and fill these screens. All CGI's would inherit this parent class and automagically get these run modes.


I have looked at maypole, but unfortunately I cannot expend time on incorporating maypole into the application, yet. Also I have searched cpan, but didnt find any modules that does this job.

Are there any common strategies that I can use for such instances ?
Has any one implemented a similar solution ? (Im sure this is not new, all Im looking for is a diet maypole!)

In reply to CGI::Application & automagic run-modes by InfiniteLoop

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.