On Wed, May 21, 2008 at 5:26 PM, Torsten Foertsch
<[EMAIL PROTECTED]> wrote:
> On Wed 21 May 2008, william wrote:
>> I don't know why they don't just recommend using
>> ModPerl::RegistryPrefork instead of ModPerl::Registry , that could
>> save a lot of other people's trouble. But there must be a reason that
>> I don't know.
>
> because it won't work with a threaded MPM.
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: [EMAIL PROTECTED]
>

Sigh...Even ModPerl::RegistryPrefork does not work as what I want, why
do they say "Run unaltered CGI scripts under mod_perl" when it is
working differently with CGI ?

/var/www/modperl/Dir/Test.pm
package Dir::Test;

use Cwd;
use Storable;

sub mygetcwd()
{
        open(FILE, 'textfile') || die "$!"; #No such file or directory at
/var/www/modperl//Dir/Test.pm line 8.\n
        print <FILE>;
        print cwd; #The result is "/var/www/modperl"
}

1;

/var/www/modperl/Dir/textfile
Hello world

/var/www/modperl/test.pl
use CGI qw(:standard);
print header;

use Dir::Test;
Dir::Test::mygetcwd();


Because the working directory is always the directory of the start of
execution file /var/www/modperl .So why can't I use the relative
directory , it only works if I use open(FILE, 'Dir/textfile');

Thanks.

Reply via email to