On Aug 17, 2007, at 3:53 PM, John Siracusa wrote: >>> Finally, I suppose I could change the default implementation of >>> init_db() to be more like this instead: >>> >>> sub init_db { $DB ||= Rose::DB->new } >>> >>> But that'd be quite a behavior change, and it'd have its own set >>> of problems. >> >> What are the problems here? Since I adopted this for the time >> being it >> would be nice to know what I have to expect... > > I just meant that it'd be a change in historic behavior that could > break some people's code when they upgrade (not that RDBO is 1.0 yet, > but it's still nice to avoid this kind of thing, if possible).
Right. It would be a problem for people that use connections to multiple databases from within the same application. If you are going to cache the Rose::DB object, you need to be smart and make sure you are returning a Rose::DB object that was requested, not just the previous on created. Graham. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object