From: Mattia B. <mb...@ds...> - 2002-07-23 10:19:22
|
> > Don't use UNIVERSAL::isa, its use is discouraged > > Not arguing with you, but that's a new one on me. What's your source? IIRC perl5-porters > I checked some in the Perl 5.8 doc and I did notice that: > > use UNIVERSAL qw(isa); They surely talked about that. I probably remembered incorrectly that using UNIVERSAL::isa was discouraged. > (which I use a lot and have recommended, oops) is discouraged in favor of: Me too... > *isa = \&UNIVERSAL::isa; This has a minor problem. The problem is that some module may decide to override ->isa to make objects appear to be in some class they are not blessed into. Using UNIVERSAL::isa breaks that. Of course few modules actually do that so this is a minor problem. Sorry for the confusion Mattia |