On Mon, 13 Mar 2006, Philippe M. Chiasson wrote:

Randy Kobes wrote:
The t/TestAPI/add_config test fails for me on Win32
because the current way of getting the directory in
on line 58 of add_config.pm produces an invalid directory
name on Windows due the the presence of the drive letter.
This diff:

=====================================================
Index: add_config.pm
===================================================================
--- add_config.pm       (revision 385119)
+++ add_config.pm       (working copy)
@@ -3,6 +3,7 @@
  use strict;
  use warnings FATAL => 'all';

+require File::Spec;
  use Apache2::Access ();
  use Apache2::CmdParms ();
  use Apache2::RequestUtil ();
@@ -54,7 +55,7 @@
      $r->pnotes(add_config2 => "$@");

      eval {
-        my $directory = join '/', ('', $r->document_root,
+        my $directory =
File::Spec::Unix->catfile($r->document_root,
                                     'TestAPI__add_config');

Wouldn't that be

File::Spec->catfile() ?

Unfortunately, if one did use that on Windows here, then
the '\' directory separator used would lead to
problems in

          $r->add_config(["<Directory $directory>",
                        'AllowOverride All Options'.$o,


as it would think characters following the '\' were
meant to be escaped. One could then fix that up, but
I thought using File::Spec::Unix would be simpler.

--
best regards,
Randy

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

Reply via email to