develooper Front page | perl.perl5.porters | Postings from January 2001

[ID 20010103.025] The defined() command is creating an entry in ahash when it shouldn't

From:
smp
Date:
January 3, 2001 17:02
Subject:
[ID 20010103.025] The defined() command is creating an entry in ahash when it shouldn't
Message ID:
200101040101.TAA08738@talc.cadc.cypress.com

This is a bug report for perl from smp@cypress.com,
generated with the help of perlbug 1.22 running under perl 5.006.


-----------------------------------------------------------------
[Please enter your report here]

The defined() check in the code snip below creates a key in the %asdf
hash.  Is this how it should work?

#!/usr/local/bin/perl
print("Before ***", keys(%asdf), "***\n");
if (defined($asdf{"bogusKey"}[0])) {
  print("Say anything\n");
}
print("After ***", keys(%asdf), "***\n");


[Please do not change anything below this line]
-----------------------------------------------------------------

---
This perlbug was built using Perl 5.00465 - Mon May 18 14:07:15 CDT 1998
It is being executed now by  Perl 5.006 - Wed Apr  5 10:29:53 CDT 2000.

Site configuration information for perl 5.006:

Configured by bab at Wed Apr  5 10:29:53 CDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris-thread
    uname='sunos ruby 5.6 generic_105181-16 sun4u sparc sunw,ultra-2 '
    config_args='-Dusethreads -Duse5005threads -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=define useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=2.95.2 19991024 (release)
    cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl 5.006:
    /usr/local/lib/perl5/5.6.0/sun4-solaris-thread
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.5.660/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.5.660
    /usr/local/lib/perl5/site_perl/5.00563/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.00563
    /usr/local/lib/perl5/site_perl/5.00562/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.00562
    /usr/local/lib/perl5/site_perl/5.00561/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.00561
    /usr/local/lib/perl5/site_perl/5.00552/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.00552
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl 5.006:
    HOME=/usr/cadc04/users/smp
    LANG (unset)
    LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/openwin/lib:/usr/lib:/usr/dt/lib:/usr/local/lib:/usr/cadc04/users/smp/xpm/xpm-3.4k-solaris/lib
    LOGDIR (unset)
    PATH=/usr/cadc30/designs/c68013/config/cydir/bin/sun4v:.:/usr/cadc04/users/smp/bin:/usr/cadc30/designs/c68013/config/topddc/bin:/usr/ccs/bin:/usr/diamond00/users/common/wrappers:/usr/dt/bin:/usr/lib/lp/postscript:/usr/local/bin:/usr/diamond01/dcdlapps/bin:/usr/diamond00/local/sun4v:/usr/diamond00/local/bin:/usr/openwin/bin:/usr/openwin/demo:/usr/cadc30/designs/c68013/config/cydir/cadc_tools/bin/sun4v:/usr/cadc30/designs/c68013/config/cydir/bin/sun4v:/usr/cadc30/designs/c68013/config/cydir/cds/tools/dfII/bin:/usr/cadc30/designs/c68013/config/cydir/cds/tools/bin:/usr/cadc30/designs/c68013/config/cydir/cds/tools/vampire/bin:/usr/cadc30/designs/c68013/config/cydir/cds/tools/dracula/bin:/usr/cadc30/designs/c68013/config/cydir/cds/tools/iccraft/bin:/usr/local/Synopsys/bin:/usr/cadc01/tools/synchronicity/syncinc/bin:/usr/ucb:/bin:/usr/bin:/usr/sbin:/usr/cadc04/users/smp/local/bin:/usr/cadc09/designs/spcm/local/bin:/usr/cadc09/designs/spcm/bin
    PERL_BADLANG (unset)
    SHELL=/bin/csh




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