On 12/5/06 10:18 AM, Michael Lackhoff wrote: > many thanks for your help, the only part I don't understand is why I need a > new DB object:
Well, you need *a* db object from somewhere, and you need to share that db object among the manager, the row object, and the places where you lock and unlock. Get the db from wherever you want. I just created one in-place in my example. >> sub generate_invoice_number >> { >> my $class = shift; >> my $db = My::DB->new; # Rose::DB subclass > > Why not just use the default here? What default? >> my $nums = >> $class->get_numbers(db => $db, >> query => [ year => $year ]); > > Well, here actually. See above about using the same db to lock/unlock and to do the other work. -John ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object