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

Re: New release ?

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
January 5, 2007 15:40
Subject:
Re: New release ?
Message ID:
b77c1dce0701051540u22693d4fnc2d4a24abb851ff2@mail.gmail.com
On 06/01/07, Brandon Black <blblack@gmail.com> wrote:
> As things stand now (and have for a long time presumably), all classes
> inherit the methods of UNIVERSAL, and Foo->isa('UNIVERSAL') on any
> class returns true.  Additionally, if one takes the (psychotic)
> measure of stuffing other classes in @UNIVERSAL::ISA, all classes
> inherit the methods of these packages (there's even a test for this,
> so clearly it is meant to work).

And there's code on CPAN that relies on this.

> However, ->isa checks for those superclasses fail.  Attached is a
> short perl script that demonstrates what I'm talking about, which
> seems rather inconsistent.  Is this inconsistency something we want to
> preserve for historical reasons, or should it be remedied (I could do
> that either as a separate patch or as part of the c3 patch since it
> touches on this code anyways).

I don't know -- I suspect some code might rely on this too. The usual
suspect would be in the UNIVERSAL:: namespace on CPAN. Also, since the
superclasses of UNIVERSAL will also be subclasses of UNIVERSAL too,
won't this be a risk of infinite recursion ?

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