develooper Front page | perl.perl5.porters | Postings from October 2010

[perl #5091] UNIVERSAL inconsistencies

Thread Previous
From:
Father Chrysostomos via RT
Date:
October 10, 2010 16:56
Subject:
[perl #5091] UNIVERSAL inconsistencies
Message ID:
rt-3.6.HEAD-6656-1286754965-325.5091-15-0@perl.org
On Fri Jan 05 06:19:15 2001, root@rt158.private.realtime.co.uk wrote:
> And it works, with one (depressingly large) caveat: It doesn't work if
> any client code uses UNIVERSAL::isa directly.

Since you reported this, the documentation has been updated. UNIVERSAL
now says:

           # but never do this!
           $is_io    = UNIVERSAL::isa($fd, "IO::Handle");
           $sub      = UNIVERSAL::can($obj, "print");

and highly recommends only calling those as $thing->isa/can(...).

Is that a sufficient fix?


Thread Previous


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