Commit c8b4b5ed authored by's avatar
Browse files

* Evil Mangler broke under Perl 5.9+ because $* is gone; this fixes it.

  Perl 4's special variable $* controls multi-line matching; it's been
  deprecated from Perl 5's inception, and is finally removed in Perl
  versions 5.9 (soon to be 5.10).

  Since GHC depends on Perl 5.6+ anyway, this patch introduces an
  equivalent effect to $* without using that special variable, by
  hooking into Perl's regex parsing process to add the /m flag.
parent 28ae38a3
......@@ -542,10 +542,13 @@ print STDERR "T_HDR_vector: $T_HDR_vector\n";
sub mangle_asm {
local($in_asmf, $out_asmf) = @_;
local($i, $c);
# multi-line regexp matching:
local($*) = 1;
local($i, $c);
# local($*) = 1;
# the above line used to work, but Perl 5.10 removes $*, so we uses an
# equivalent construct that works in Perl 5.6 and later.
BEGIN { require overload; overload::constant( qr => sub { "(?m:$_[1])" } ) }
# ia64-specific information for code chunks
my $ia64_locnum;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment