This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Setting $_ to multiline glob in @INC filter
authorFather Chrysostomos <sprout@cpan.org>
Fri, 9 Aug 2013 20:01:39 +0000 (13:01 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 11 Aug 2013 14:50:22 +0000 (07:50 -0700)
commit00752fe19253197bdc8525118d2757f895d207e7
treea4d6a60ebf46d13792d224ee42ee0e7c48e107da
parentbc0fad74cd8dabf5c1344c64d7ccec733cc18f24
Setting $_ to multiline glob in @INC filter

This commit corrects the one remaining code path in
pp_ctl.c:S_run_user_filter that was not handling non-PVs.

If we have to truncate $_ and keep the remainder in a cache (because
it has more than one line), we need to make sure we don’t assume it is
a PV when it comes to truncating it.

$ ./perl -Ilib -e '@INC = sub { sub { return 0 if $|--; $_ = *{"foo;\nbar"}; return 1 } }; do "foo"'
Assertion failed: (!isGV_with_GP(upstream)), function S_run_user_filter, file pp_ctl.c, line 5494.
Abort trap: 6
pp_ctl.c
t/op/incfilter.t