develooper Front page | perl.perl5.porters | Postings from May 2008

[perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin)

Thread Next
From:
Bram via RT
Date:
May 17, 2008 18:54
Subject:
[perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin)
Message ID:
rt-3.6.HEAD-11257-1211022849-1634.38955-15-0@perl.org
On Thu Apr 20 15:31:19 2006, jeremyhetzler@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.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About