[cgiapp] [announce] OO MVC jumpstart/starter application
Ron Savage
ron at savage.net.au
Thu Dec 4 17:43:35 EST 2008
Hi Mark
The first thing I'd say is about user.cgi:
1) You talk about changing the value of $PRIVATE_HOME_DIR
I would use a config file, and have the 2 values of $PRIVATE_HOME_DIR in
that file.
Yes, I know switching something in the config file (or env) seems to be
the same as switching something in the code, but I prefer to keep the
code generic.
2) You use $PRIVATE_HOME_DIR = '../../app1_private';
OK, so you're not using mod_perl, and didn't mention Apache::Registry,
but that '../../' worries me.
I take every opportunity to warn beginners that they should be extremely
careful about assumptions as to which directory their script thinks is
the current directory when it starts. More here:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends
--
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html
More information about the cgiapp
mailing list