
perlbug-followup at perl
Apr 20, 2006, 3:31 PM
Post #1 of 4
(239 views)
Permalink
|
|
[perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin)
|
|
# New Ticket Created by Jeremy Hetzler # Please include the string: [perl #38955] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38955 > Message-Id: <5.8.7_3884_1145571853[at]frederick> This is a bug report for perl from jeremyhetzler[at]gmail.com, generated with the help of perlbug 1.35 running under perl v5.8.7. ----------------------------------------------------------------- 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. Likewise, /bin/splain reports: $ perl -e'exists $foo' 2>&1 | splain exists argument is not a HASH or ARRAY element at -e line 1 (#1) (F) The argument to exists() must be a hash or array element, such as: $foo{$bar} $ref->{"susie"}[12] 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. The splain output should be: (F) The argument to exists() must be a hash or array element or a subroutine name, such as: $foo{$bar} $ref->{"susie"}[12] &foo [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl v5.8.7: Configured by gerrit at Fri Dec 30 02:40:15 2005. Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=cygwin, osvers=1.5.18(0.13242), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 inspiron 1.5.18(0.13242) 2005-07-02 20:30 i686 unknown unknown cygwin ' config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld2', ldflags =' -s -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -ldb -lcrypt -lgdbm_compat perllibs=-lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' -s -L/usr/local/lib' Locally applied patches: SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962 --- @INC for perl v5.8.7: /home/steveb/lib/perl lib /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 . --- Environment for perl v5.8.7: HOME=/home/steveb LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR=/home/steveb/log PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/usr/local/bin:/usr/bin:/c/Program Files/VDMSound:/c/Program Files/ATI Technologies/ATI Control Panel:/d/Java/jdk1.5.0_05/bin:/d/programs/diskeeper/:/c/Program Files/MKVtoolnix:~/scripts:/c/Program Files/PuTTY PERL5LIB=/home/steveb/lib/perl:lib PERLIO=perlio PERLLIB=/e/steveb/lib/perl PERL_BADLANG (unset) SHELL=/usr/bin/bash
|