[Dbix-class] "table" methods in schemas?

Marcus Ramberg marcus at thefeed.no
Wed Feb 1 20:31:49 CET 2006


On 2/1/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> On Wed, Feb 01, 2006 at 01:29:57PM +0000, Mike Rylander wrote:
> > On 1/31/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > [snip]
> > >
> > > I've been wondering whether it might not be cool to have something where
> > > during creation, a ResultSource will check to see if (for a result_class
> > > of MyDB::Foo) there's a MyDB::FooSet class, and if so use that as its
> > > default resultset_class instead of DBIx::Class::ResultSet.
> > >
> > > But I dunno, and there's about 3 million different possible naming
> > > convention you could use, which leads me to expect either a holy war or
> > > needing to implement something like RDBO's ConventionManager if I try it.
> > >
> > > Anybody got any suggestions?
> >
> > How about
> >
> >   MyDB::Foo->resultset_manager('MyDB::FooSet');
>
> __PACKAGE__->result_source_instance->resultset_class('MyDB::FooSet');
>
> would already work. I wasn't asking about that, I was asking about some
> sort of "automatic defaulting" so people can easily create and use custom
> resultsets in a standard way without the extra boilerplate.
>

I think putting it in a separate namespace would be better.. For
example MyDB::RS::Foo

--
With regards
Marcus Ramberg



More information about the Dbix-class mailing list