in reply to Re: Say no to ref $thing eq "Expected::Type"
in thread Putting file contents into a scalar
Suppose I come up with a type that doesn't inherit from IO::File, but has all the proper behaviors of IO::File. Why should you reject it?
All you should care is that when you send close to it, it closes. Hence, can is more appropriate than isa, almost every time.
Or, to avoid the overhead, just drop it into an eval block.
-- 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: Say no to ref $thing eq "Expected::Type"
by rir (Vicar) on Oct 29, 2002 at 19:23 UTC | |
by merlyn (Sage) on Oct 29, 2002 at 19:34 UTC | |
by rir (Vicar) on Oct 30, 2002 at 05:25 UTC | |
by merlyn (Sage) on Oct 30, 2002 at 06:55 UTC | |
by dws (Chancellor) on Oct 30, 2002 at 07:39 UTC | |
| |
by Anonymous Monk on Oct 30, 2002 at 08:45 UTC | |
by rir (Vicar) on Oct 30, 2002 at 19:15 UTC |