I made an attempt at something similar a couple of years ago but I think you’ve made a better go of it (at least you’ve had some replies :-).

I agree with moritz though, and you should include it in your post. I also agree you could remove the bold font.

Getting the file structure right is indeed key. Shouldn’t all your modules be under a lib dir? Perhaps two, one for base/common modules and separate lib dirs for each app with a corresponding structure below those for ‘helper’ modules much like Perl does it. Also you have a conf file in the same dir as a module. They might be more at home in a conf dir. There is no need for template files to be under your document root (fewer files here the better, imo) so perhaps a tmpl dir too under your app dir.

Your base class has hard coded dirs for finding the cnf file and the tmpl files and you don’t specify any for your sessions. I think this is something that the instance script could usefully pass to the app module. The instance script already has a hard coded path to the lib so perhaps you could pass that and your base module could then find everything it needs (e.g. tmp, data, tmpl, sessions, cnf).

I think there may be a missing closing and opening code tag just before the Common.pm code.

Well done and good luck!


In reply to Re: Draft of CGI::Application Tutorial -- RFC by wfsp
in thread Draft of CGI::Application Tutorial -- RFC by bradcathey

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.