diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-09 13:32:30 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-11 07:50:22 -0700 |
commit | 2e8409ad08dc8f8f81c8bdba02f7423a301ff4e0 (patch) | |
tree | f9e7a7af209173adad92871cd8803dd192d3be73 /pp_ctl.c | |
parent | 00752fe19253197bdc8525118d2757f895d207e7 (diff) | |
download | perl-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); } |