From: Bram Date: Sat, 17 May 2008 04:14:11 +0000 (-0700) Subject: [perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0fdf69ec50f40b936b80fb258d82bfc8e867346;p=p5sagit%2Fp5-mst-13.2.git [perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin) From: "Bram via RT" Message-ID: p4raw-id: //depot/perl@33849 --- diff --git a/op.c b/op.c index dc58747..c314caf 100644 --- 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); } diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 05a082c..b5f18dd 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -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: