Francesc X.Noria wrote: > On Thu, 11 Jul 2002 16:56:38 -0700 > Josh Bernstein <[EMAIL PROTECTED]> wrote: > > : "/". My question is how can I set the working directory to be the > : location of where the script is running..... (This would make mod_perl > : correctly locate file that I have included in the running script ie: > : require "./file.pl") Can this be done from within Apache? > > Maybe you could use this trick: > > use FindBin qw($Bin); > use lib $Bin;
You cannot. FindBin does its magic in the BEGIN block, which will run only once under mod_perl. http://perl.apache.org/release/docs/1.0/guide/snippets.html#More_on_Relative_Paths you can do 'do FindBin', but you add the overhead. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com