Randy Kobes wrote:
In building mod_perl 2 on Win32, there's problems if
the specified MP_AP_PREFIX contains spaces. The following
diff:
========================================================
Index: lib/ModPerl/BuildOptions.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
retrieving revision 1.16
diff -u -r1.16 BuildOptions.pm
--- lib/ModPerl/BuildOptions.pm 21 May 2002 16:48:29 -0000 1.16
+++ lib/ModPerl/BuildOptions.pm 15 Feb 2003 20:28:13 -0000
@@ -67,6 +67,11 @@
$val = File::Spec->canonpath(File::Spec->rel2abs($val));
}
+ if ($key eq 'MP_AP_PREFIX' and $^O =~ /Win32/i) {
+ require Win32;
+ $val = Win32::GetShortPathName($val);
+ }
+
if ($self->{$key}) {
$self->{$key} .= ' ';
}
============================================================
allows the build in such cases to complete.
Thanks Randy, but better use the constant, does this work the same?

Index: lib/ModPerl/BuildOptions.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
retrieving revision 1.16
diff -u -r1.16 BuildOptions.pm
--- lib/ModPerl/BuildOptions.pm 21 May 2002 16:48:29 -0000      1.16
+++ lib/ModPerl/BuildOptions.pm 16 Feb 2003 23:15:04 -0000
@@ -3,6 +3,8 @@
 use strict;
 use warnings;

+use Apache::Build ();
+
 my $param_qr = qr([\s=]+);

 use constant VERBOSE => 1;
@@ -65,6 +67,12 @@

             if($key eq 'MP_APXS') {
                 $val = File::Spec->canonpath(File::Spec->rel2abs($val));
+            }
+
+            # MP_AP_PREFIX may not contain spaces
+            if ($key eq 'MP_AP_PREFIX' && Apache::Build::WIN32()) {
+                require Win32;
+                $val = Win32::GetShortPathName($val);
             }

             if ($self->{$key}) {


__________________________________________________________________
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