[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl-dev
Subject:    [mp2] ModPerl-Registry redirect test
From:       Randy Kobes <randy () theoryx5 ! uwinnipeg ! ca>
Date:       2003-11-29 14:39:40
[Download RAW message or body]

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);

?

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic