On Wed, Aug 03, 2005 at 05:29:28PM -0700, Dean Arnold wrote:
> 
> Since I've forgotten about this only a few dozen times now,
> I'll offer this bit of text for future inclusion in the
> DBI POD (where to put it, and the exact text, I'll leave
> to the keepers):
> 
> B<Note> that DBI subclasses are not strictly inherited
> subclasses in the classic OO sense. Your subclassed driver,
> connection, and statement objects B<must> be derived
> through the DBI at some point in order to acquire some
> neccesary "magic" needed for any methods not explicitly
> overridden in your subclass, or for any methods invoked on
> the SUPER class. If you see errors like the following:
> 
>       SV = PVMG(0x39ca0a4) at 0x1d1d8f0
>         REFCNT = 1
>         FLAGS = (ROK)
>         IV = 0
>         NV = 0
>         RV = 0x24b24b8
>         PV = 0x24b24b8 ""
>         CUR = 0
>         LEN = 0
>       dbih_getcom handle MyDBI::db=HASH(0x24b24b8) is not a DBI handle
>       (has no magic) at ....
> 
> your object probably hasn't been derived through the appropriate
> base class.

Could you make that a little more explicit? Including how to fix it.

Expressing it as a clarification/extension of the "Subclassing the DBI"
section of the docs would be good:
  http://search.cpan.org/~timb/DBI/DBI.pm#Subclassing_the_DBI

Tim.

p.s. I'm not making any suggestions here to avoid distorting your thinking :)

Reply via email to