On 3/2/07, Adam Kennedy [EMAIL PROTECTED] wrote:
99.999% of the time you do not want to really know how something is
implemented, you want to remain ignorant.
I concur, which is what really pisses me off them
IO::String-new(\$string)-isa('IO::Handle') returns false, because the
author
On Friday 02 March 2007 00:53, demerphq wrote:
*snip good discussion*
Now if there was an -implements() utility function as well as the
-isa() funcation, then I think IO::Handle would contrive to ensure
that IO::String-new(\$string)-implements('IO::Handle') would return
true even though
On 2 Mar 2007, at 00:35, Adam Kennedy wrote:
[snip]
Well, except you aren't supposed to do that, because if -isa can
be overloaded, it can also die or throw an exception. So eval
{ $obj-isa($class) } falsely ignores errors.
[snip]
That, of course, depends on whether you want to ignore
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Moin.
On Friday 02 March 2007 08:53:43 demerphq wrote:
On 3/2/07, Adam Kennedy [EMAIL PROTECTED] wrote:
99.999% of the time you do not want to really know how something is
implemented, you want to remain ignorant.
I concur, which is what
Michael G Schwern wrote:
Yuval Kogman wrote:
Likewise with ref in boolean context, I almost never want the object
to be able to lie to me.
But if it has to work hard to lie, then does it matter?
Yeah, I'm with Yuval here. There seem to be a cold war going on here wrt
identifying an object.
Adam Kennedy wrote:
IT SHOULD NOT BE THIS COMPLICATED TO IDENTIFY THE HERITAGE OF AN OBJECT!
use Params::Util '_INSTANCE';
if ( _INSTANCE($obj, 'Whatever') ) {
}
Oh good, depend on another module to implement a basic language feature.
(I appreciate your suggestion but I'm LAMENTING