This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More bug-compatibility with old ExtUtils::ParseXS
authorSteffen Mueller <smueller@cpan.org>
Sat, 12 Feb 2011 17:52:00 +0000 (18:52 +0100)
committerSteffen Mueller <smueller@cpan.org>
Tue, 12 Jul 2011 18:54:48 +0000 (20:54 +0200)
dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm

index 6e1d36d..b6d07bc 100644 (file)
@@ -660,6 +660,11 @@ sub _get_inputmap_hash {
   my %rv;
   foreach my $xstype (keys %$lookup) {
     $rv{$xstype} = $storage->[ $lookup->{$xstype} ]->code;
+
+    # Squash trailing whitespace to one line break max
+    # This isn't strictly necessary, but makes the output more similar
+    # to the original ExtUtils::ParseXS.
+    $rv{$xstype} =~ s/\s+?\n\z/\n/;
   }
 
   return \%rv;