From 1a904fc88069e249a4bd0ef196a3f1a7f549e0fe Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 25 Nov 2012 12:57:04 -0800 Subject: Disable PL_sawampersand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PL_sawampersand actually causes bugs (e.g., perl #4289), because the behaviour changes. eval '$&' after a match will produce different results depending on whether $& was seen before the match. Using copy-on-write for the pre-match copy (preceding patches do that) alleviates the slowdown caused by mentioning $&. The copy doesn’t happen unless the string is modified after the match. It’s now a post- match copy. So we no longer need to do things differently depending on whether $& has been seen. PL_sawampersand is now #defined to be equal to what it would be if every program began with $',$&,$`. I left the PL_sawampersand code in place, in case this commit proves immature. Running Configure with -Accflags=PERL_SAWAMPERSAND will reënable the PL_sawampersand mechanism. --- makedef.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'makedef.pl') diff --git a/makedef.pl b/makedef.pl index 7afc35ff04..0593342462 100644 --- a/makedef.pl +++ b/makedef.pl @@ -279,6 +279,10 @@ unless ($define{'PERL_OLD_COPY_ON_WRITE'} ++$skip{Perl_sv_setsv_cow}; } +unless ($define{PERL_SAW_AMPERSAND}) { + ++$skip{PL_sawampersand}; +} + unless ($define{'USE_REENTRANT_API'}) { ++$skip{PL_reentrant_buffer}; } -- cgit v1.2.1