in reply to Draft of CGI::Application Tutorial -- RFC
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Draft of CGI::Application Tutorial -- RFC
by bradcathey (Prior) on Jul 17, 2008 at 14:36 UTC |