Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I decided to try Class::DBI::Loader but have run in to a problem with transactions. When I was using Class::DBI, I simply defined a routine do_transaction() as suggested in the documentation, and this was inherited by all my table classes. However, with Class::DBI::Loader, the table classes are automatically created and don't inherit my code.
I solved this by creating a second package in the file, which contained the do_transaction() routine, and describing it as an additional_base_class. This seems to work, but I'm not sure if it was the best way to handle the problem, so I hope that someone with experience using Class::DBI::Loader could tell me how this is usually addressed. The documentation for Class::DBI::Loader is a bit on the skimpy side.
Thank you for your advice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Class::DBI::Loader and transactions
by jasonk (Parson) on Apr 26, 2005 at 15:26 UTC | |
|
Re: Class::DBI::Loader and transactions
by davidrw (Prior) on Apr 26, 2005 at 14:22 UTC | |
|
Re: Class::DBI::Loader and transactions
by perrin (Chancellor) on Apr 26, 2005 at 14:50 UTC |