develooper Front page | perl.perl5.porters | Postings from November 2000

[ID 20001113.001] UNIVERSAL::isa can report incorrect results

From:
Sean McAfee
Date:
November 13, 2000 08:10
Subject:
[ID 20001113.001] UNIVERSAL::isa can report incorrect results
Message ID:
200011131610.LAA21774@waits.facilities.med.umich.edu

This is a bug report for perl from mcafee@waits.facilities.med.umich.edu,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

If one package (say, Bar) is declared to be a subclass of another package
(say, Foo) by assigning to the first package's @ISA array, UNIVERSAL::isa
denies that Bar is a subclass of Foo unless Foo's stash has been created.

This prints nothing:

perl -le '@Bar::ISA = "Foo"; print "Bar"->isa("Foo")'

This prints "1":

perl -le '@Bar::ISA = "Foo"; $Foo::var = 1; print "Bar"->isa("Foo")'



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.6.0:

Configured by mcafee at Sat Apr 15 20:23:27 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos waits.facilities.med.umich.edu 5.6 generic_105181-03 sun4u sparc '
    config_args='-D prefix=/usr/space/perl-5.6.0 -D cc=gcc -de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=egcs-2.91.66 19990314 (egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-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=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -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 v5.6.0:
    /export/home/mcafee/perl
    /usr/space/perl-5.6.0/lib/5.6.0/sun4-solaris
    /usr/space/perl-5.6.0/lib/5.6.0
    /usr/space/perl-5.6.0/lib/site_perl/5.6.0/sun4-solaris
    /usr/space/perl-5.6.0/lib/site_perl/5.6.0
    /usr/space/perl-5.6.0/lib/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/export/home/mcafee
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/local/lib:/usr/um/tcl/lib:/usr/um/tk/lib:/usr/local/qt/lib
    LOGDIR (unset)
    PATH=/export/home/mcafee/bin:/usr/local/bin:/usr/java1.1/bin:/usr/openwin/bin:/export/home/mcafee/ldap/bin:/usr/um/gnu/bin:/usr/um/bin:/usr/ccs/bin:/usr/bin:/usr/games:/usr/local/qt/bin
    PERL5LIB=/export/home/mcafee/perl
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash




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