This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don't count on 'trap 0' inside () in shell script
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index 59a6ea7..863478d 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -139,6 +139,8 @@ PP(pp_rv2gv)
                if (op->op_flags & OPf_REF ||
                    op->op_private & HINT_STRICT_REFS)
                    DIE(no_usym, "a symbol");
+               if (dowarn)
+                   warn(warn_uninit);
                RETSETUNDEF;
            }
            sym = SvPV(sv, na);
@@ -181,6 +183,8 @@ PP(pp_rv2sv)
                if (op->op_flags & OPf_REF ||
                    op->op_private & HINT_STRICT_REFS)
                    DIE(no_usym, "a SCALAR");
+               if (dowarn)
+                   warn(warn_uninit);
                RETSETUNDEF;
            }
            sym = SvPV(sv, na);