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

Re: New release ?

Thread Previous | Thread Next
Rafael Garcia-Suarez
January 5, 2007 15:40
Re: New release ?
Message ID:
On 06/01/07, Brandon Black <> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About