in reply to •Re: Re: Say no to ref $thing eq "Expected::Type"
in thread Putting file contents into a scalar
All you should care is that when you send close ... it closes. Hence, can is more appropriate than isa...
can tells me if by chance it has a method.
isa tells me it has all the proper behaviours
by intent.
Hence isa is almost always more appropriate than can.
I'm really not that sure where I sit in this argument, so I would be glad to read a clarification or rebuttal.
I got a laugh out of your example of first param a ref or class, as I've just forsworn the casual usage of
bless $me, ref $self || $self;
as false laziness. And I drew a blank on any other ordinary usage.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Re: •Re: Re: Say no to ref $thing eq "Expected::Type"
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 Aristotle (Chancellor) on Oct 30, 2002 at 13:05 UTC | |
by Anonymous Monk on Oct 30, 2002 at 08:45 UTC | |
by rir (Vicar) on Oct 30, 2002 at 19:15 UTC |