This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
properly restore PL_rsfp_filters after require
[perl5.git] / pp_ctl.c
index 04efce6..f5b45b3 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2697,10 +2697,8 @@ PP(pp_require)
     ENTER;
     SAVETMPS;
     lex_start(sv_2mortal(newSVpv("",0)));
-    if (PL_rsfp_filters){
-       save_aptr(&PL_rsfp_filters);
-       PL_rsfp_filters = NULL;
-    }
+    SAVEGENERICSV(PL_rsfp_filters);
+    PL_rsfp_filters = Nullav;
 
     PL_rsfp = tryrsfp;
     name = savepv(name);