summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-03-07 03:46:37 +1200
committerChip Salzenberg <chip@atlantic.net>1997-03-07 04:01:12 +1200
commitd83e6520878f26ddb2592ab5b8b67eb482e51ea6 (patch)
treee05d3759566da0d7e57fc52c34bd01393908695a /pp_hot.c
parentf80924e7bd8c4d7568804ea1ad8e9f6ad1b28f8f (diff)
downloadperl-d83e6520878f26ddb2592ab5b8b67eb482e51ea6.tar.gz
Warn on %{+undef} and @{+undef}
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index f2864c0f9a..d9a4f07113 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -412,7 +412,6 @@ PP(pp_print)
PP(pp_rv2av)
{
dSP; dPOPss;
-
AV *av;
if (SvROK(sv)) {
@@ -450,6 +449,8 @@ PP(pp_rv2av)
if (op->op_flags & OPf_REF ||
op->op_private & HINT_STRICT_REFS)
DIE(no_usym, "an ARRAY");
+ if (dowarn)
+ warn(warn_uninit);
if (GIMME == G_ARRAY)
RETURN;
RETPUSHUNDEF;
@@ -487,9 +488,7 @@ PP(pp_rv2av)
PP(pp_rv2hv)
{
-
dSP; dTOPss;
-
HV *hv;
if (SvROK(sv)) {
@@ -527,6 +526,8 @@ PP(pp_rv2hv)
if (op->op_flags & OPf_REF ||
op->op_private & HINT_STRICT_REFS)
DIE(no_usym, "a HASH");
+ if (dowarn)
+ warn(warn_uninit);
if (GIMME == G_ARRAY) {
SP--;
RETURN;