diff options
author | Tom Phoenix <rootbeer@teleport.com> | 1998-03-28 07:26:46 -0800 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-04-02 16:13:24 +0000 |
commit | 1930e9396af9d9fc0058435c827d67f591aa4e03 (patch) | |
tree | 24df53c731d9ac3f949f340ce1dc2e5257c423db /pp_hot.c | |
parent | 8fde5078471a0c312457a335e09b9df2f722133e (diff) | |
download | perl-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.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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: |