On Thu, Dec 4, 2008 at 5:43 PM, Ron Savage <[EMAIL PROTECTED]> wrote:

> 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.


Ron, thanks for the feedback.
I use PRIVATE_HOME_DIR to find the config file... chicken and egg here?
How would you suggest I rewrite it?   Use another config file just for the
directory?


> 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
>

So are you suggesting to simply hardcode the path from / instead of trying
to use relative directory paths (../../)?
I would like the application to run under mod_perl and Apache::Registry too,
if possible, but I have little experience with the former, and no experience
with the latter.

-- Mark

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to