stas 2004/07/16 15:43:11
Modified: ModPerl-Registry/t/conf modperl_extra_startup.pl
Log:
can't use catfile with server_root as it contains unix dir
separators and in a few of our particular tests we compare against
win32 separators. in general avoid using server_root_relative in your
code, see the manpage for more details
Revision Changes Path
1.19 +10 -4 modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl
Index: modperl_extra_startup.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -u -r1.18 -r1.19
--- modperl_extra_startup.pl 16 Jul 2004 01:10:45 -0000 1.18
+++ modperl_extra_startup.pl 16 Jul 2004 22:43:11 -0000 1.19
@@ -8,12 +8,18 @@
use Apache::ServerRec ();
use Apache::ServerUtil ();
+use Apache::Process ();
-use File::Spec ();
use DirHandle ();
-my $base_dir = File::Spec->catdir(Apache::ServerUtil::server_root,
- "cgi-bin");
+my $proc = Apache->server->process;
+my $pool = $proc->pool;
+
+# can't use catfile with server_root as it contains unix dir
+# separators and in a few of our particular tests we compare against
+# win32 separators. in general avoid using server_root_relative in your
+# code, see the manpage for more details
+my $base_dir = Apache::ServerUtil::server_root_relative($pool, "cgi-bin");
# test the scripts pre-loading by explicitly specifying uri => filename
my $rl = ModPerl::RegistryLoader->new(package => "ModPerl::Registry");
@@ -30,7 +36,7 @@
sub trans {
my $uri = shift;
$uri =~ s|^/registry_bb/|cgi-bin/|;
- return File::Spec->catdir(Apache::ServerUtil::server_root, $uri);
+ return Apache::ServerUtil::server_root_relative($pool, $uri);
}
my $rl = ModPerl::RegistryLoader->new(