- use a temp file to avoid messing with echo on Win32 when building
authorTony Cook <tony@develop=help.com>
Tue, 24 May 2005 04:59:30 +0000 (04:59 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 24 May 2005 04:59:30 +0000 (04:59 +0000)
  META.yml

Changes
Makefile.PL

diff --git a/Changes b/Changes
index 90aff0826df33a67ac9fbc530bffc75b4db4b1f7..ca7667f723ae1a697bca81f4a4917c0333af7e7e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1106,6 +1106,8 @@ Revision history for Perl extension Imager.
   mis-generated with the gcc 4.0 that ships with OS X 10.4
 - work around junk that pkg-config sends to stderr on FreeBSD 4.10
 - testimg/base.jpg was missing from the MANIFEST, causing test failures
+- use a temp file to avoid messing with echo on Win32 when building
+  META.yml
 
 =================================================================
 
index 8e39cb02b5f1f80b290068505fefb82aa14e4bbe..5d1754f852ed4a204cf1711ef86050b3031e8ea5 100644 (file)
@@ -161,19 +161,11 @@ dynamic_config: 1
 distribution_type: module
 generated_by: Imager version $self->{VERSION}
 YAML
+  open META, "> meta.tmp" or die "Cannot create meta.tmp: $!";
+  print META $meta;
+  close META;
   
-  my @write;
-  if ($self->can('echo')) {
-    # use EU::MM's version where possible, hopefully it's portable
-    @write = $self->echo($meta, 'META.yml');
-  }
-  else {
-    my @lines = split /\n/, $meta;
-    @lines = map qq{"$_"}, @lines;
-    push @write, "\${ECHO} ".shift(@lines)." >META.yml";
-    push @write, map { "\${ECHO} $_ >>META.yml" } @lines;
-  }
-  return sprintf "metafile :\n\t%s\n", join "\n\t", @write;
+  return sprintf "metafile :\n\t\$(CP) meta.tmp META.yml\n";
 }
 
 # manual configuration of helper libraries