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

[perl #5091] UNIVERSAL inconsistencies

Thread Previous
Father Chrysostomos via RT
October 10, 2010 16:56
[perl #5091] UNIVERSAL inconsistencies
Message ID:
On Fri Jan 05 06:19:15 2001, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About