Re: [ANNOUNCE] ExtUtils::MakeMaker 6.52
"Jerry D. Hedden" <[email protected]> Mon, 1 Jun 2009 11:12:13 -0400
| Newsgroups | gmane.comp.lang.perl.modules.authors,gmane.comp.lang.perl.modules.extutils-makemaker.devel,gmane.comp.lang.perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
Michael G Schwern wrote: > This is a release of ExtUtils::MakeMaker, the thing that runs your > Makefile.PL. > Bug Fixes > * maybe_command() will recognize Windows executables in > /cygdrive on Cygwin [rt.cpan.org 16375] (PJF) The implemented tests don't work if the drive prefix (cygdrive) is changed by the user (like I do :). I have submitted a bug report on this along with a patch (also attached here). Thanks. Bug report: https://rt.cpan.org/Ticket/Display.html?id=46585
cygwin.patch
(application/octet-stream, 1.6 KB)
# https://rt.cpan.org/Ticket/Display.html?id=46585
--- ExtUtils-MakeMaker-6.52/t/MM_Cygwin.t.orig 2009-06-01 10:51:51.057360300 -0400
+++ ExtUtils-MakeMaker-6.52/t/MM_Cygwin.t 2009-06-01 10:59:04.438438300 -0400
@@ -104,30 +104,29 @@
SKIP: {
my $comspec = $ENV{COMSPEC};
- skip("\$ENV{COMSPEC} does not exist", 3) unless $comspec;
+ skip("\$ENV{COMSPEC} does not exist", 1) unless $comspec;
- # Convert into cygwin-flavoured '/cygdrive/c/...' path.
- # Is there a better way than direct munging? A File::*
- # module perhaps?
+ $comspec = Cygwin::win_to_posix_path($comspec);
- $comspec =~ s{^(\w):} {/cygdrive/\l$1}x;
- $comspec =~ s{\\ } {/}gx;
+ ok(MM->maybe_command($comspec),
+ qq{'$comspec' should be executable"}
+ );
+}
- ok(MM->maybe_command($comspec),"$comspec should be executable");
+# 'C:/' should *never* be executable, it's a directory.
- # /cygdrive/c should *never* be executable, it's a directory.
+my $cdrive = Cygwin::win_to_posix_path("C:/");
- ok(! MM->maybe_command(q{/cygdrive/c}),
- qq{/cygdrive/c should never be executable}
- );
+ok(! MM->maybe_command($cdrive),
+ qq{'$cdrive' should never be executable}
+);
- # Our copy of Perl (with a unix-path) should always be executable.
+# Our copy of Perl (with a unix-path) should always be executable.
- ok(MM->maybe_command($Config{perlpath}),
- qq{$Config{perlpath} should be executable}
- );
+ok(MM->maybe_command($Config{perlpath}),
+ qq{'$Config{perlpath}' should be executable}
+);
-}
package FakeOut;