In your IO::File wrapper you should override isa. Why not? It completes the wrap properly. This is a good argument for isa.But you can't. Sorry for not spelling it out earlier, but there's nothing I can do in my wrapper class to make:
return true. Yes, I could make:UNIVERSAL::isa($object_of_my_class, "IO::File")
return true, but nobody does that any more because it breaks if the item in question is not a blessed reference. Everyone uses the subroutine form now.$object_of_my_class->isa("IO::File")
So, we lose. We all lose. Some place, we've got to push it so it works. I'm saying to do that with either eval wrappers or capability testing with can, not isa.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Re: •Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"
by merlyn
in thread Putting file contents into a scalar
by ByteOrNybble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |