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

[ID 20000325.002] ->isa broken in 5.6.0

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
March 25, 2000 06:24
Subject:
[ID 20000325.002] ->isa broken in 5.6.0
Message ID:
200003251424.OAA06904@bactrian.ni-s.u-net.com
This is a bug report for perl from nick@bactrian.ni-s.u-net.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

Tk's overly complex AUTOLOAD has this code in it:

 if (!defined(&$what) && $method =~ /^[A-Z]\w+$/ && ref($_[0]) && $_[0]->isa('Tk::Widget'))
    {
     my $obj = $_[0];
     $what = "Tk::Widget::$method";
     carp "Assuming 'require Tk::$method;'";
     require "Tk/$method.pm";
    }

With perl5.6.0 the $_[0]->isa('Tk::Widget') is returning FALSE.
This is despite the fact that the AUTOLOAD has been inherited!

Printing :
   no strict 'refs';
   print join(',',@{ref($_[0]).'::ISA'}),"\n";

Gives:
Tk::Derived,Tk::Widget

As I would expect.

The case in point is Tk::Frame which starts thus:

package Tk::Frame;
require Tk::Widget;
require Tk::Derived;
use AutoLoader;
use strict qw(vars);
use Carp;

use base qw(Tk::Derived Tk::Widget);

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

Configured by nick at Fri Mar 24 10:05:51 GMT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.5, archname=i686-linux-multi
    uname='linux bactrian 2.2.5 #56 sat oct 9 20:14:35 bst 1999 i686 unknown '
    config_args='-der -O -Dcc=gcc -Doptimize=-O2 -g -Dusemymalloc=n -Dusemultiplicity=y -Dusevfork=false'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=define
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O2 -g', gccversion=egcs-2.91.66 19990314 (egcs-1.1.2 release)
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.6.0:
    /usr/local/lib/perl5.006/i686-linux
    /usr/local/lib/perl5.006/share
    /usr/local/lib/perl5.006/site/i686-linux
    /usr/local/lib/perl5.006/site/share
    /usr/local/lib/perl5.006/site/share
    .

---
Environment for perl v5.6.0:
    HOME=/home/nick
    LANG=en_GB.ISO-8859-1
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/nick/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/openwin/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde/bin:.
    PERL_BADLANG (unset)
    SHELL=/bin/bash

Thread Previous | 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