summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-09 13:32:30 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-11 07:50:22 -0700
commit2e8409ad08dc8f8f81c8bdba02f7423a301ff4e0 (patch)
treef9e7a7af209173adad92871cd8803dd192d3be73 /pp_ctl.c
parent00752fe19253197bdc8525118d2757f895d207e7 (diff)
downloadperl-2e8409ad08dc8f8f81c8bdba02f7423a301ff4e0.tar.gz
Handle magical return values from @INC filter
An @INC filter (a subroutined returned by a subroutine in @INC) could be an lvalue sub that returns a magical scalar for the status. We need to account for that. If we don’t call get-magic (FETCH), we’ll get the last value assigned to or returned from that scalar.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 1998816f54..9db13b869d 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -5443,6 +5443,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
if (count > 0) {
SV *out = POPs;
+ SvGETMAGIC(out);
if (SvOK(out)) {
status = SvIV(out);
}