On Thu, 17 Dec 2009, Michael G Schwern wrote:

Just a quick comment, I don't have tuits to look into it properly right now.
 
> Blarf.  Normally I'd say "don't use a directory with parens in it" but that
> directory seems to be some standard Windows 2000 thing.  I also see more than
> a few tools choke on it.

It is a standard directory on 64-bit Windows to store 32-bit applications.
 
> Can you write your module with Module::Build instead?  That will be much
> better suited to dealing with weird characters, since its not trying to write
> out in nine different formats.
> 
> A work around for you would be to use replace quote_paren() with
> $self->quote_literal() in MM_Unix->const_config().

Another workaround would be to use the "short pathname" for the compiler
tools. At least that's what older versions of VC++ used to do in the
vcvars32.bat or whatever it is called. It would use the short pathname
for everything it was adding to PATH, LIB and INCLUDE, which also
prevents the problem with some tools not dealing properly with spaces in
filenames.

I just did a quick check with Visual Studio 2010, and it looks like
vcvarsall.bat no longer uses the short names. :(

Ping me again next year and I'll see if I can find the time to put
some short pathname workarounds into MakeMaker.  (FWIW, I do hack
around this issue in some build server script already):

        # Use short path names for LIB/INCLUDE/PATH values in case some module's
        # Makefile.PL can't deal with spaces in filenames.
        for (qw(LIB INCLUDE PATH)) {
            next unless $ENV{$_};
            $ENV{$_} = join ';', grep defined, map { 
Win32::GetShortPathName($_) } split /;+/, $ENV{$_};
        }

Cheers,
-Jan

Reply via email to