in reply to Deriving a class from DBI.

I wouldn't.

Just create classes that delegate to DBI and wrap DBI, potentially via AUTOLOAD. You will need:

  1. One DBI-delegator, mainly implementing ->connect , returning
  2. One DBH-delegator, mainly implementing ->prepare and ->do, likely via ->prepare->execute, and
  3. One STH-delegator, mainly implementing ->execute and ->fetchall_*

I would stay away from inheritance and just store the DBI::* instances, as you seem to be mostly interested in the user side of interactions and not so much in actually modifying the behaviour of DBI and its components.

Replies are listed 'Best First'.
Re^2: Deriving a class from DBI.
by clueless newbie (Curate) on Mar 23, 2010 at 18:18 UTC

    Thanks for the suggestion. I hadn't thought of delegation.