Perl-Sensitive Sunglasses | |
PerlMonks |
•Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"by merlyn (Sage) |
on Oct 29, 2002 at 19:34 UTC ( [id://208842]=note: print w/replies, xml ) | Need Help?? |
{I said this in the CB... maybe you didn't see it.}
If I want to create a wrapper class that delegates rather than inherits, my class @ISA-not {grin} your precious IO::File, even though I'm using one internally, and delegating everything. So, please, don't check isa. It's not the right thing to do for maximum re-usability. I'd say that I could probably override UNIVERSAL::isa to report that "yes, I am in fact a IO::File". However, the most common idiom these days for determining "isa" is not with a method call, because that fails on non-blessed references. {sigh} -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|