[Dbix-class] looking for code suggestion
Fayland Lam
fayland at gmail.com
Mon Jan 28 02:43:42 GMT 2008
hmm, basically I'd like to use cache and others in Schema. so I package
my own Foorum::Schema like this:
http://foorum.googlecode.com/svn/trunk/lib/Foorum/Schema.pm
use Foorum::XUtils ();
sub base_path {
return Foorum::XUtils::base_path();
}
sub config {
return Foorum::XUtils::config();
}
sub cache {
return Foorum::XUtils::cache();
}
so that in ResultSet or pl.
we can use $schema->cache() to get the cache object. or
$self->schema->cache() in ResultSet pm.
I'm wondering if it's the correct way to do it?
Thanks.
--
Fayland Lam // http://www.fayland.org/
Foorum based on Catalyst // http://www.foorumbbs.com/
More information about the DBIx-Class
mailing list