IIRC, there is only one concern with regards to spaces, and it is the shell (cmd/command/whatever). Various modules and programs which invoke the shell don't take care to properly quote paths with spaces.

Now some of versions of the shell will correctly guess in some instances that by C:\program files\perl\bin\perl.exe blah blah you really mean "C:\program files\perl\bin\perl.exe" blah blah, but it mostly won't work right.

So, simply quote your paths when you have spaces.

I haven't thought about it in a looong while, but ExtUtils::MakeMaker doesn't take care to quote any paths to executables (AR/CC/LINK), especially the path to perl (which is absolute), but now that I have, here's a patch that seems to work. Just add the following sub to ExtUtils::MM_Win32

=item init_PERL $mm->init_PERL; Called by init_main. Sets up ABSPERL, PERL, FULLPERL and all the *PERLRUN* permutations. PERL is allowed to be miniperl FULLPERL must be a complete perl ABSPERL is PERL converted to an absolute path *PERLRUN contains everything necessary to run perl, find it's libraries, etc... *PERLRUNINST is *PERLRUN + everything necessary to find the modules being built. This Win32 specific version makes sure the path to perl is quoted if it has spaces, that is it turns C:\Program Files\Perl\bin\perl.exe into "C:\Program Files\Perl\bin\perl.exe" =cut sub init_PERL { my($self) = shift; my $Is_VMS;#bong my $Verbose = $ExtUtils::MM_Unix::Verbose;#bong my @defpath = (); foreach my $component ($self->{PERL_SRC}, $self->path(), $Config{binexp}) { push @defpath, $component if defined $component; } # Build up a set of file names (not command names). my $thisperl = $self->canonpath($^X); $thisperl .= $Config{exe_ext} unless # VMS might have a file version # at the end $Is_VMS ? $thisperl =~ m/$Config{exe_ext}(;\d+)?$/i : $thisperl =~ m/$Config{exe_ext}$/i; # We need a relative path to perl when in the core. $thisperl = $self->abs2rel($thisperl) if $self->{PERL_CORE}; my @perls = ($thisperl); push @perls, map { "$_$Config{exe_ext}" } ('perl', 'perl5', "perl$Config{version}"); # miniperl has priority over all but the cannonical perl when in t +he # core. Otherwise its a last resort. my $miniperl = "miniperl$Config{exe_ext}"; if( $self->{PERL_CORE} ) { splice @perls, 1, 0, $miniperl; } else { push @perls, $miniperl; } $self->{PERL} ||= $self->find_perl(5.0, \@perls, \@defpath, $Verbose ); # don't check if perl is executable, maybe they have decided to # supply switches with perl # When built for debugging, VMS doesn't create perl.exe but ndbgpe +rl.exe. my $perl_name = 'perl'; $perl_name = 'ndbgperl' if $Is_VMS && defined $Config{usevmsdebug} && $Config{usevmsdebug} eq 'define' +; # XXX This logic is flawed. If "miniperl" is anywhere in the path # it will get confused. It should be fixed to work only on the fi +lename. # Define 'FULLPERL' to be a non-miniperl (used in test: target) ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/$perl_name/i unless $self->{FULLPERL}; # Little hack to get around VMS's find_perl putting "MCR" in front # sometimes. $self->{ABSPERL} = $self->{PERL}; my $has_mcr = $self->{ABSPERL} =~ s/^MCR\s*//; if( $self->file_name_is_absolute($self->{ABSPERL}) ) { $self->{ABSPERL} = '$(PERL)'; } else { $self->{ABSPERL} = $self->rel2abs($self->{ABSPERL}); $self->{ABSPERL} = 'MCR '.$self->{ABSPERL} if $has_mcr; } # quote the path to perl.exe if it has spaces, if( $self->{PERL} =~ /^(.*?\.exe)/ and $1 =~ /\s/ ){ $self->{PERL} =~ s/^(.*?\.exe)(.*)/"$1"$2/; } # Are we building the core? $self->{PERL_CORE} = 0 unless exists $self->{PERL_CORE}; # How do we run perl? foreach my $perl (qw(PERL FULLPERL ABSPERL)) { my $run = $perl.'RUN'; $self->{$run} = "\$($perl)"; # Make sure perl can find itself before it's installed. $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"} if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE}; $self->{$perl.'RUNINST'} = sprintf q{$(%sRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}, $pe +rl; } return 1; }

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: The Evil Embedded Space by PodMaster
in thread The Evil Embedded Space by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.