develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #4687] UNIVERSAL::isa can report incorrect results

From:
Michael G Schwern via RT
Date:
July 23, 2005 01:45
Subject:
[perl #4687] UNIVERSAL::isa can report incorrect results
Message ID:
rt-3.0.11-4687-118187.8.92057091783904@perl.org
> [mcafee@waits.facilities.med.umich.edu - Mon Nov 13 00:10:45 2000]:
>
> 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")'

This bug is still present in 5.8.6 and bleadperl.




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