in reply to Re: Draft of CGI::Application Tutorial -- RFC
in thread Draft of CGI::Application Tutorial -- RFC
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?
|
|---|