MM_Unix.pm : work around File::Find problem on VMS
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Cygwin.pm
index 0192836..3c37ffd 100644 (file)
@@ -10,7 +10,7 @@ require ExtUtils::MM_Any;
 require ExtUtils::MM_Unix;
 @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
 
-$VERSION = 1.02_01;
+$VERSION = 1.04;
 
 sub cflags {
     my($self,$libperl)=@_;
@@ -19,7 +19,7 @@ sub cflags {
 
     my $base = $self->SUPER::cflags($libperl);
     foreach (split /\n/, $base) {
-      / *= */ and $self->{$`} = $';
+        /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
     };
     $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true');
 
@@ -27,8 +27,6 @@ sub cflags {
 CCFLAGS = $self->{CCFLAGS}
 OPTIMIZE = $self->{OPTIMIZE}
 PERLTYPE = $self->{PERLTYPE}
-LARGE = $self->{LARGE}
-SPLIT = $self->{SPLIT}
 };
 
 }
@@ -81,7 +79,9 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
 sub perl_archive {
     if ($Config{useshrplib} eq 'true') {
         my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
-        $libperl =~ s/a$/dll.a/;
+        if( $] >= 5.007 ) {
+            $libperl =~ s/a$/dll.a/;
+        }
         return $libperl;
     } else {
         return '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");