From: Nicholas Clark Date: Sat, 12 Sep 2009 06:38:32 +0000 (+0100) Subject: re.pm will load under miniperl, so don't hard-code its values into ParseXS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a049506658d2a1f1262d7635971158f305c441f6;p=p5sagit%2Fp5-mst-13.2.git re.pm will load under miniperl, so don't hard-code its values into ParseXS (There's special-case code in the core to make re.pm available early as lib/re.pm, as it's needed by other modules in the XS toolchain, so we don't need a special case and attendant fragility in ExtUtils::ParseXS) --- diff --git a/ext/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/ext/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm index 3fa4cc0..93bca09 100644 --- a/ext/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm +++ b/ext/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm @@ -18,7 +18,7 @@ my(@XSStack); # Stack of conditionals and INCLUDEs my($XSS_work_idx, $cpp_next_tmp); use vars qw($VERSION); -$VERSION = '2.2002'; +$VERSION = '2.2003'; use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re $Overload $errors $Fallback $cplusplus $hiertype $WantPrototypes $WantVersionChk $except $WantLineNumbers @@ -210,7 +210,9 @@ sub process_file { $size = qr[,\s* (??{ $bal }) ]x; # Third arg (to setpvn) foreach my $key (keys %output_expr) { - BEGIN { $^H |= 0x00200000 }; # Equivalent to: use re 'eval', but hardcoded so we can compile re.xs + # We can still bootstrap compile 're', because in code re.pm is available to + # miniperl, and does not attempt to load the XS code. + use re 'eval'; my ($t, $with_size, $arg, $sarg) = ($output_expr{$key} =~ diff --git a/ext/re/re.pm b/ext/re/re.pm index 54d504f..742a018 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -23,11 +23,6 @@ my %bitmask = ( # - File::Basename contains a literal for 'taint' as a fallback. If # taint is changed here, File::Basename must be updated as well. # -# - ExtUtils::ParseXS uses a hardcoded -# BEGIN { $^H |= 0x00200000 } -# in it to allow re.xs to be built. So if 'eval' is changed here then -# ExtUtils::ParseXS must be changed as well. -# # *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** sub setcolor {