[perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7...
authorBram <perl-rt@wizbit.be>
Sat, 17 May 2008 04:14:11 +0000 (21:14 -0700)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 18 May 2008 07:55:44 +0000 (07:55 +0000)
From: "Bram via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-11257-1211022849-1634.38955-15-0@perl.org>

p4raw-id: //depot/perl@33849

op.c
pod/perldiag.pod

diff --git a/op.c b/op.c
index dc58747..c314caf 100644 (file)
--- a/op.c
+++ b/op.c
@@ -6556,7 +6556,7 @@ Perl_ck_exists(pTHX_ OP *o)
        else if (kid->op_type == OP_AELEM)
            o->op_flags |= OPf_SPECIAL;
        else if (kid->op_type != OP_HELEM)
-           Perl_croak(aTHX_ "%s argument is not a HASH or ARRAY element",
+           Perl_croak(aTHX_ "%s argument is not a HASH or ARRAY element or a subroutine",
                        OP_DESC(o));
        op_null(kid);
     }
index 05a082c..b5f18dd 100644 (file)
@@ -131,7 +131,7 @@ for example, turn C<-w -U> into C<-wU>.
 
 (F) msgsnd() requires a string at least as long as sizeof(long).
 
-=item %s argument is not a HASH or ARRAY element
+=item %s argument is not a HASH or ARRAY element or a subroutine
 
 (F) The argument to exists() must be a hash or array element or a
 subroutine with an ampersand, such as: