[CDBI] State of the DBIx::Class Class::DBI compatibility layer

Victor Churchill victorchurchill at gmail.com
Thu Feb 14 10:30:46 GMT 2008

On 14/02/2008, Michael G Schwern <schwern at pobox.com> wrote:
 > Victor Churchill wrote:
 >  > On 14/02/2008, Michael G Schwern <schwern at pobox.com> wrote:
 >  >
 >  > I was really excited to see this post, until this bit..
 >  >

>  >>  ... And since most CDBI projects are one file, one class, one

>  >>  table I don't believe it to be pressing.
 >  >
 >  > Is that serious? "One file, one class, one table?" I am using a
 >  > "fairly complex" data model which involves a lot of navigation and,
 >  > coming from a starting point of pure DBI+DBD, enjoyed the opportunity
 >  > given me by CDBI to say $thisobj->{thisAttr}->{thatAttr}.
 > Please don't say that.  Say $thisobj->thisAttr->thatAttr.  I tore my hair out
 >  emulating $obj->{column} in CDBICompat because the code base I'm working on
 >  uses CDBI objects like hashes.

Thank you for the tip. I had not realised this was problematic.

 >  > And then
 >  > was daunted by the prospect of migrating to DBIxC so this
 >  > compatibility development looked like a Great Thing. So I am
 >  > concerned...
 > I think we have another misinterpretation.
 >  It's one CDBI class PER file.  You can certainly use multiple classes.
 >  Let me make it clear.
 >  Currently, in CDBICompat, if you declare a relationship to another class the
 >  foreign class either has to A) already be declared or B) has to be in a file
 >  that can be required.

> ...

 OK, I get that. Although all my class packages are declared in one
 file I don't see that as a Big Problem.

 Thank you for the clarification!

More information about the ClassDBI mailing list