Tim Bunce wrote:

Thanks. I had meant to redo that using $Config::Config{path_sep}.
In other words, only complain about colons in the cwd if path_sep is ':'.
Could you try that for me and send me an updated patch?

No problem - the attached patch1.txt does that (using just $Config{path_sep} since %Config is already imported from Config.pm).

Alternatively, patch2.txt complains if the cwd contains the $Config{path_sep}, whatever character that might be. (I don't know if it was specifically colons that caused you problems, or path separators generally.)

Either patch works for me.

- Steve
--- DBD.pm.orig 2003-08-20 01:15:42.000000000 +0100
+++ DBD.pm      2003-09-08 17:06:53.000000000 +0100
@@ -3561,8 +3561,7 @@
 
 sub _cwd_check {
     my $cwd = cwd();
-    return unless $cwd =~ m/:/;
-    return if $^O eq 'darwin';
+    return unless $Config{path_sep} eq ':' and $cwd =~ /:/;
     warn "*** Warning: Colons in the current directory path ($cwd) may cause 
problems\a\n";
     sleep 2;
 }
--- DBD.pm.orig 2003-08-20 01:15:42.000000000 +0100
+++ DBD.pm      2003-09-08 17:10:57.000000000 +0100
@@ -3561,9 +3561,8 @@
 
 sub _cwd_check {
     my $cwd = cwd();
-    return unless $cwd =~ m/:/;
-    return if $^O eq 'darwin';
-    warn "*** Warning: Colons in the current directory path ($cwd) may cause 
problems\a\n";
+    return unless $cwd =~ /$Config{path_sep}/;
+    warn "*** Warning: Path separator characters (`$Config{path_sep}') in the current 
directory path ($cwd) may cause problems\a\n";
     sleep 2;
 }
 

Reply via email to