#!perl -w
use strict;
-use Test::More tests => 1;
+use Test::More tests => 3;
use XS::APItest;
+{
+ use feature "unicode_eval";
+ my $unfiltered_foo = "foo";
+ eval "BEGIN { filter() }";
+ like $@, qr/^Source filters apply only to byte streams at /,
+ 'filters die under unicode_eval';
+ is "foo", $unfiltered_foo, 'filters leak not out of unicode evals';
+}
+
BEGIN { eval "BEGIN{ filter() }" }
is "foo", "fee", "evals share filters with the currently compiling scope";
(F) A sort comparison subroutine may not return a list value with more
or less than one element. See L<perlfunc/sort>.
+=item Source filters apply only to byte streams
+
+(F) You tried to activate a source filter (usually by loading a
+source filter module) within a string passed to C<eval>. This is
+not permitted under the C<unicode_eval> feature. Consider using
+C<evalbytes> instead. See L<feature>.
+
=item splice() offset past end of array
(W misc) You attempted to specify an offset that was past the end of
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)