I would use something like Class::DBI::Loader to keep the data model definition in one place, and there has recently been a hack on the cdbi mailing list to create "unbound" Class::DBI-like mock objects that one can manipulate and only later save into the database (or not at all).
Here is the mail by Peter Speltz, a tentative name is Class::DBI::Plugin::Temp.
In reply to Re: many-many relations in object modeling
by Corion
in thread many-many relations in object modeling
by other90percent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |