On 10/20/06 2:58 PM, Jonathan Vanasco wrote:
> I just wanted to bench the difference...
>
> auto_prime_caches is a class method, can't seem to find a way to
> toggle it globally
The "real" way to do it "globally" would be to make a custom metadata
subclass and set the auto_prime_caches attribute to false by default in a
custom version of the init() method:
package My::DB::Object::Metadata;
use base 'Rose::DB::Object::Metadata';
sub init
{
my($self) = shift;
$self->auto_prime_caches(0); # off by default
$self->SUPER::init(@_);
}
Then you'd make your RDBO-derived object base class use your custom metadata
subclass.
package My::DB::Object;
use base 'Rose::DB::Object';
use My::DB::Object::Metadata;
...
sub meta_class { 'My::DB::Object::Metadata' }
That said, with Perl there's always a brute force way to do it. Like
perhaps...
use Rose::DB::Object::Metadata;
no warnings 'redefine';
sub Rose::DB::Object::Metadata::auto_prime_caches { 0 }
at the top of your startup.pl maybe? :)
-John
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object