summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorTom Phoenix <rootbeer@teleport.com>1998-03-28 07:26:46 -0800
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 16:13:24 +0000
commit1930e9396af9d9fc0058435c827d67f591aa4e03 (patch)
tree24df53c731d9ac3f949f340ce1dc2e5257c423db /pp_hot.c
parent8fde5078471a0c312457a335e09b9df2f722133e (diff)
downloadperl-1930e9396af9d9fc0058435c827d67f591aa4e03.tar.gz
Re: Odd number of elements in hash list.
p4raw-id: //depot/perl@858
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 1d8ef684ce..0422605e8d 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -644,8 +644,15 @@ PP(pp_aassign)
}
TAINT_NOT;
}
- if (relem == lastrelem && dowarn)
- warn("Odd number of elements in hash list");
+ if (relem == lastrelem && dowarn) {
+ if (relem == firstrelem &&
+ SvROK(*relem) &&
+ ( SvTYPE(SvRV(*relem)) == SVt_PVAV ||
+ SvTYPE(SvRV(*relem)) == SVt_PVHV ) )
+ warn("Reference found where even-sized list expected");
+ else
+ warn("Odd number of elements in hash assignment");
+ }
}
break;
default: