[Dbix-class] Rows as singletons

David Cantrell david at cantrell.org.uk
Tue Jun 24 18:46:38 BST 2008


I've been mumbling on IRC over the last week or two about rows being
singletons when they get loaded into memory.  This is mostly because,
when writing tests for a DBIx::Class based project I got irritated when
I had two references to the same row hanging around in memory, update()d
one of them, but the other still had old data in it.

Here's my fix:
  http://www.cantrell.org.uk/david/private/SingletonRows.pm

Comments would be most welcome.

Please note that it shouldn't be re-distributed yet, or used in any of
your projects, as it's not yet got a proper licence on it.

-- 
David Cantrell | top google result for "internet beard fetish club"

Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.
   -- Robert A Heinlein



More information about the DBIx-Class mailing list