On 3/7/06 7:31 PM, Ron Savage wrote: > package Monash::Rose::MorseCode::Base::DB; > ... > Rose::DB -> use_private_registry(); > Rose::DB -> default_domain('windows'); > Rose::DB->register_db(...) > > o At the start of the first package I have: > Rose::DB -> use_private_registry(); > sort of as per the doc Rose::DB::Object::Tutorial sample code just under the > heading TUTORIAL/Preface. Actually, that sample uses __PACKAGE__, not > Rose::DB. When I tried using __PACKAGE__ I got this error: > -----><8----- > No database information found for domain 'windows' and type 'default' at > d:/Perl/site/lib/Monash/Rose/MorseCode/Base/Object.pm line 16
You should use __PACKAGE__ everywhere: __PACKAGE__->use_private_registry(); __PACKAGE__->default_domain('windows'); __PACKAGE__->register_db(...); These are class methods. You want the invocant to be the current class because you want to modify this class's behavior, not Rose::DB's. > o Why is init_db called three times? Is this meant to happen? Other things behind the scenes sometimes need a db to interrogate or to do certain functions. It's normal. -John ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object