LPW: Slides... DBIC and new recommendations!

David Cantrell david at cantrell.org.uk
Tue Dec 2 15:28:41 GMT 2008


On Sun, Nov 30, 2008 at 12:43:01PM +0000, Paul Makepeace wrote:
> On Sun, Nov 30, 2008 at 10:39 AM, Leo Lapworth <leo at cuckoo.org> wrote:
> > I've put the slides from my talk (the 20 min version) online:
> > http://www.slideshare.net/ranguard/dbixclass-beginners-presentation/
> > After a discussion with Matt Trout in the pub I am not as convinced about my
> > tip of putting an 's' at the end of a table name (there's now a comment in

If you're using an ORM, why would you care what the underlying table is
like?  You'll always access it via the ORM.

> There's an argument from the ER crowd that entities (classes) are
> singular so why transform your singular entity names to plural when
> making concrete in SQL/database?
>
> My personal experience has been initially plural and then after much
> SQL/DB work going back to singular as I hated all the little awkward
> moments that seem to crop up.

I think there's a time and place for both.

$customer = Foo::Bar::Customer->create(...);
@debtors = Foo::Bar::Customers->search(...);

So perhaps the solution is:

  package Foo::Bar::Customers;
  use base qw(Foo::Bar::Customer);

:-)

-- 
David Cantrell | A machine for turning tea into grumpiness

More people are driven insane through religious hysteria than
by drinking alcohol.    -- W C Fields


More information about the london.pm mailing list