develooper Front page | perl.perl5.porters | Postings from September 2003

RE: perl562@20985 [PATCH MakeMaker]

Thread Next
Orton, Yves
September 8, 2003 03:31
RE: perl562@20985 [PATCH MakeMaker]
Message ID:
Found another Win32 problem in MakeMaker.

ExtUtils::Install is using the Unix path seperator on Win32.

Patch as follows

--- ExtUtils-MakeMaker-6.16/lib/ExtUtils/     2003-06-05
10:04:31.000000000 +0200
+++ ExtUtils-MakeMaker-6.16-pathced/lib/ExtUtils/     2003-09-08
11:58:26.000000000 +0200
@@ -15 +15 @@
-my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' :
+my $splitchar = $^O eq 'VMS' ? '|' : $^O=~/^(?:os2|dos|MSWin32)$/ ? ';' :

Although I do not understand why you go through this contortion when there
is $Config{path_sep} available for use. 

E:\.cpan\build>perl -MConfig -e"print $Config{path_sep}"

Is there some reason that value can't be trusted?  

Also I kinda think that File::Spec should have a path seperator method that
does the right thing per OS. It seems to me that it is reasonable to have
this piece of information encoded into File::Spec, or even better a method
for splitting things like $ENV{PATH} and $ENV{PERL5LIB} that would Do The
Right Thing in a portable way. I know that ive seen this particular piece of
logic in a lot of code, and IMO it makes sense to factor it out. 


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About