Hello again,
I have another problem trying to get one of my Perl
modules to load in my startup.pl script for the first time. In a couple places
in my scripts, I assume that the current directory is the one in which the
current script is being run. So for example, if my DocumentRoot is D:/htdocs/
and someone requests http://myhostname/script.cgi, if I need
to use some files, my current directory is D:/htdocs.
The two things I currently do this for
are
a) configuration file, which is loaded on startup
by the module I am trying to get loaded in my startup.pl script
b) templates (for template-toolkit), which I
specify to be in the directory 'templates' relative to the location where the
scripts are running, meaning they are in D:/htdocs/templates.
I see only disadvantages to having to specify
absolute paths in both these cases. For one, I have another web server running
on port 8080, which I use to test my scripts on, and whose DocumentRoot is
D:/htdocs-dev. So if I had to manually change the paths each time I copied files
over from the development DocumentRoot to the production one, I would go
crazy.
Is there a way to guarantee that the current
directory will be the correct one when I need it to? Or does anyone have another
suggestion?
Thanks!
J-S
_______________________________________________
Jean-Sébastien Guay [EMAIL PROTECTED] Software Developer, Hybride http://www.hybride.com Piedmont, Québec, Canada |
- Current directory Oskar
- Re: Current directory Thomas Klausner
- Re: Current directory Oskar
- Re: Current directory Randy Kobes
- Re: Current directory Jean-Sebastien Guay
- Re: Current directory Perrin Harkins
- Re: Current directory Jean-Sebastien Guay
- Re: Current directory Perrin Harkins
- Re: Current directory Randy Kobes
- Re: Current directory Jean-Sebastien Guay
- Re: Current directory Jean-Sebastien Guay
- Re: Current directory Perrin Harkins
- Re: Current directory Jean-Sebastien Guay
- Re: Current directory Perrin Harkins
- Re: Current directory Jean-Sebastien Guay