in reply to Re: •Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"
in thread Putting file contents into a scalar
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: •Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"
by dws (Chancellor) on Oct 30, 2002 at 07:39 UTC | |
by Aristotle (Chancellor) on Oct 30, 2002 at 13:05 UTC | |
|
Re: •Re: Re: •Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"
by Anonymous Monk on Oct 30, 2002 at 08:45 UTC | |
|
(Re:)+ Say no to ref $thing eq "Expected::Type"
by rir (Vicar) on Oct 30, 2002 at 19:15 UTC |