Re: Using Scalar::Util

[prev] [thread] [next] [Date index for 2004/06/23]

From: Takes Tea at Half Past Three
Subject: Re: Using Scalar::Util
Date: 18:02 on 23 Jun 2004
>my $obj = [];
>$obj->foo();

Can't call method "foo" on unblessed reference.


>it will pass the ref() check, but blow up when it tries to do any 
>method calls. I don't expect that this will happen in real life (if 
>ever), but it's just a more complete check. And since the module is 
>in a distribution already that is a dependency it's not any more 
>effort.

It won't even get to the ref() check.

I can see that this would probably be easy to code, and that the 13% 
hit isn't realistically going to make a big difference, since almost 
all of the time C::DBI spends doing work is not in ref. I just don't 
see this adding any real benefit. So why go to the trouble of making 
the change? How does the "completeness" of the check actually improve 
the code?


        -- 
        Aneel Nazareth -- http://eye-of-newt.com/nazareth --

Using Scalar::Util
Drew Taylor 13:48 on 23 Jun 2004

Re: Using Scalar::Util
Perrin Harkins 14:10 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 14:32 on 23 Jun 2004

Re: Using Scalar::Util
merlyn (Randal L. Schwartz) 15:53 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 16:43 on 23 Jun 2004

Re: Using Scalar::Util
Tony Bowden 16:53 on 23 Jun 2004

Re: Using Scalar::Util
Perrin Harkins 16:59 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 17:35 on 23 Jun 2004

Re: Using Scalar::Util
Tony Bowden 18:36 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 19:01 on 23 Jun 2004

Re: Using Scalar::Util
Takes Tea at Half Past Three 17:40 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 17:51 on 23 Jun 2004

Re: Using Scalar::Util
Takes Tea at Half Past Three 18:02 on 23 Jun 2004

Re: Using Scalar::Util
Drew Taylor 18:27 on 23 Jun 2004

Re: Using Scalar::Util
Edward J. Sabol 18:27 on 23 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52