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 /parser.h | |
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 'parser.h')
-rw-r--r-- | parser.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -112,6 +112,9 @@ typedef struct yy_parser { /* flags for lexer API */ #define LEX_STUFF_UTF8 0x00000001 #define LEX_KEEP_PREVIOUS 0x00000002 +#ifdef PERL_CORE +# define LEX_START_SAME_FILTER 0x00000001 +#endif /* flags for parser API */ #define PARSE_OPTIONAL 0x00000001 |