
perlbug-followup at perl
May 17, 2008, 4:14 AM
Post #1 of 1
(58 views)
Permalink
|
|
[perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin)
|
|
On Thu Apr 20 15:31:19 2006, jeremyhetzler[at]gmail.com wrote: > ----------------------------------------------------------------- > The error message when passing exists() a wrong argument type is: > > $ perl -e'exists $foo' > exists argument is not a HASH or ARRAY element at -e line 1. > [...] > > However, the argument to exists can legitimately also be a subroutine > name: > > $ perl -e'exists &foo' > > The docs correctly state that the argument can be any of a hash > element, > an array element, or a subroutine name. > > The error message should be: > exists argument is not a HASH or ARRAY element or subroutine name at > -e line 1. [...] Patch that changes the error message to: 'exists argument is not a HASH or ARRAY element or a subroutine' attached.
|