[RDBO] auto_prime_caches, or common custom Metadata

2007-03-08 Thread Michael Reece
my $dbh isn't available at the time that mod_perl starts up.  after a  
couple hours of debugging, i figured out that i need to pass

auto_prime_caches = 0,

to __PACKAGE__-meta-setup(...)

however, i have a lot of classes.  is there a way to add this  
behavior (or other similar metadata) to the base class (say, My::RDBO)?

---
michael reece :: software engineer :: [EMAIL PROTECTED]



-
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.phpp=sourceforgeCID=DEVDEV
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] auto_prime_caches, or common custom Metadata

2007-03-08 Thread Michael Reece
here's what i came up with:

in package My::RDBO::_base,

sub meta_class { 'My::RDBO::_meta' }

and then,

package My::RDBO::_meta;
use base 'Rose::DB::Object::Metadata';

sub auto_prime_caches { 0 }

1;


is this the expected way to do this sort of thing?

On Mar 8, 2007, at 4:15 PM, Michael Reece wrote:

 my $dbh isn't available at the time that mod_perl starts up.  after a
 couple hours of debugging, i figured out that i need to pass

   auto_prime_caches = 0,

 to __PACKAGE__-meta-setup(...)

 however, i have a lot of classes.  is there a way to add this
 behavior (or other similar metadata) to the base class (say,  
 My::RDBO)?

 ---
 michael reece :: software engineer :: [EMAIL PROTECTED]



 -- 
 ---
 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.phpp=sourceforgeCID=DEVDEV
 ___
 Rose-db-object mailing list
 Rose-db-object@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rose-db-object

---
michael reece :: software engineer :: [EMAIL PROTECTED]



-
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.phpp=sourceforgeCID=DEVDEV
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] auto_prime_caches, or common custom Metadata

2007-03-08 Thread John Siracusa
On 3/8/07 7:33 PM, Michael Reece wrote:
 here's what i came up with:
 
 in package My::RDBO::_base,
 
 sub meta_class { 'My::RDBO::_meta' }
 
 and then,
 
 package My::RDBO::_meta;
 use base 'Rose::DB::Object::Metadata';
 
 sub auto_prime_caches { 0 }

 is this the expected way to do this sort of thing?

Yes, only perhaps with a less creepy metadata class name :)  Making a custom
metadata subclass is a common way to change default behavior.  It needn't be
a hidden class with a name like _meta.  Just call it My::RDBO::Metadata.

-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.phpp=sourceforgeCID=DEVDEV
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] auto_prime_caches, or common custom Metadata

2007-03-08 Thread John Siracusa
On 3/8/07 9:44 PM, [EMAIL PROTECTED] wrote:
 that's all fine and good until i create a table called 'metadata'. :)

Distinct namespaces will avoid that.  No need for name mangling.  Example:

My::DBObject - common base class
My::DBObject::Metadata - custom metadata class

My::DB::Foo - for table foo
My::DB::Bar - for table bar
...

-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.phpp=sourceforgeCID=DEVDEV
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object