Thanks for your comments, wfsp

Shouldn’t all your modules be under a lib dir?

I have been back and forth on a lib directory. It is expected, but for some reason I always equate lib with the Perl app itself, and CPAN modules and the like. But I'm open and want to do what's best for the tutorial.

Also you have a conf file in the same dir as a module.

I usually put a .conf file in it's own directory, but was trying to keep it simple. But to your point, see below.

/opt/foobar/lib/---+ | | | | | Foobar_Super.pm | | | Common.pm | | | /Acmecorp/---+ | | | Contact.pm | | | /conf/---+ | | | acmecorp.conf | | /var/www/acmecorp/--+ | home.html | /contact/----+ | | | index.cgi | /templates/---+ | | | contact.tmpl | thankyou.html
There is no need for template files to be under your document root

The reason I do this: we are a design firm and my designers need access to the templates, but I don't want them mucking around on the app side. But to your point, I have done this in the past. What would be best for the tutorial?

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.

Hmmmm, not sure how this would look for session. Can you give me an example?

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

In reply to Re^2: Draft of CGI::Application Tutorial -- RFC by bradcathey
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.