diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-03-29 08:33:30 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-04-03 16:20:32 -0700 |
commit | 27fcb6ee0bb7765fc92447e27763fa4ab7ae9baa (patch) | |
tree | c59544566b46bbc9cd288c8fbbd12cf3b5793d2c /op.c | |
parent | c2c97af8cb32b7e57f42c6e11ab8084075742761 (diff) | |
download | perl-27fcb6ee0bb7765fc92447e27763fa4ab7ae9baa.tar.gz |
[perl #87064] eval no longer shares filters
Before this commit:
commit f07ec6dd59215a56bc1159449a9631be7a02a94d
Author: Zefram <zefram@fysh.org>
Date: Wed Oct 13 19:05:19 2010 +0100
remove filter inheritance option from lex_start
The only uses of lex_start that had the new_filter parameter false,
to make the new lexer context share source filters with the previous
lexer context, were uses with rsfp null, which therefore never invoked
source filters. Inheriting source filters from a logically unrelated
file seems like a silly idea anyway.
string evals could inherit the same source filter space as the cur-
rently compiling code. Despite what the quoted commit message says,
sharing source filters allows filters to be inherited in both direc-
tions: A source filter created when the eval is being compiled also
applies to the file with which it is sharing its space.
There are at least 20 CPAN distributions relying on this behaviour
(or, rather, what could be considered a Test::More bug). So this com-
mit restores the source-filter-sharing capability. It does not change
the current API or make public the API for sharing source filters, as
this is supposed to be a temporary stop-gap measure for 5.14.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4453,7 +4453,7 @@ Perl_vload_module(pTHX_ U32 flags, SV *name, SV *ver, va_list *args) ENTER; SAVEVPTR(PL_curcop); - lex_start(NULL, NULL, 0); + lex_start(NULL, NULL, LEX_START_SAME_FILTER); utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), veop, modname, imop); LEAVE; |