Randy Kobes wrote:
In one of the redirect tests of ModPerl-Registry, catfile
is used to construct the location of a script, which for
non-unix doesn't use '/' as the directory separator. This
===========================================================
Index: ModPerl-Registry/t/redirect.t
===================================================================
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/redirect.t,v
retrieving revision 1.6
diff -u -r1.6 redirect.t
--- ModPerl-Registry/t/redirect.t       23 Nov 2003 21:01:50 -0000      1.6
+++ ModPerl-Registry/t/redirect.t       29 Nov 2003 14:28:38 -0000
@@ -16,7 +16,7 @@
     my $redirect_path = "/registry/basic.pl";
     my $url = "$base_url?$redirect_path";
     my $vars = Apache::Test::config()->{vars};
-    my $script_file = catfile $vars->{serverroot}, 'cgi-bin', 'basic.pl';
+    my $script_file = $vars->{serverroot} . '/cgi-bin/basic.pl';

     ok t_cmp(
         "ok $script_file",
====================================================================
fixes it.

Another option might be to

use File::Spec::Unix;
my $script = File::Spec::Unix->catfile($var1, $var2);

Ah, what do you get as a response? a path like /tmp/foo.pl on win32? In which case the problem would be coming from:


$_[0]->{FILENAME} = $_[1]->filename;

in RegistryCooker.pm, which sets $0, eventually printed by cgi-bin/basic.pl. Does $r->filename return a unix path on winFU?

__________________________________________________________________
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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to