diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-29 19:56:18 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-06 01:13:46 -0700 |
commit | f1c31c527b5fd97a0d6c39c815e40a37674881ca (patch) | |
tree | 35237861fdc41cd644f21efaf6f146c3cfc0d54c /toke.c | |
parent | cc7b5b23f454a503cb20d27859ae5c49d0a911e3 (diff) | |
download | perl-f1c31c527b5fd97a0d6c39c815e40a37674881ca.tar.gz |
Forbid source filters in Unicode evals
Source filters have always been byte-level filters. Therefore they
don’t make sense on Unicode strings, unless we are planning to add
new APIs to support it. Until then, croak.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3839,6 +3839,9 @@ Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) if (!PL_parser) return NULL; + if (PL_parser->lex_flags & LEX_IGNORE_UTF8_HINTS) + Perl_croak(aTHX_ "Source filters apply only to byte streams"); + if (!PL_rsfp_filters) PL_rsfp_filters = newAV(); if (!datasv) |