[Dbix-class] retrieve_from_sql

Paul Makepeace lists.rawmode.org at paulm.com
Wed Oct 19 03:57:58 CEST 2005


Je 2005-10-17 23:29:40 +0100, Matt S Trout skribis:
> my $sth = MyClass->storage->dbh->prepare(...);

That reminds me: I was wondering why the underlying ::_db connection
class is only injected into the table classes rather than the DB or even
Schema class too? (What's the _db stub for, btw? I.e. why not just
for example in MyDB?)

  my $dbh = MyDB->storage->dbh;
  my $dbh = MySchema->storage->dbh;

seems to me more intuitive/aesthetic versus,

  my $dbh = MyPickAClassAnyClass->storage->dbh;

Perhaps something to do with multiple dbh per schema?

Paul

-- 
Paul Makepeace .............................. http://paulm.com/inchoate/

"If that doesn`t make any sense, then you shouldn`t have married her."
   -- http://paulm.com/toys/surrealism/



More information about the Dbix-class mailing list