[Dbix-class] select * from questions
phaylon
phaylon at dunkelheit.at
Fri Apr 28 13:14:43 CEST 2006
Gavin Carr said:
> The Cookbook discusses adding new ResultSet methods, but not overriding
> them, which is where I got entangled.
There are two methods: Adding a method to the resultset through the
:ResultSet attribute and creating your own resultset class. The second way
should work better when you want to override methods, as it's just
C<base>ing:
package Fnord::Schema::MyResultSet;
use base qw/ DBIx::Class::ResultSet /;
sub search { ... }
1;
And then in your table class:
__PACKAGE__->resultset_class('Fnord::Schema::MyResultSet');
Tho I haven't tested it yet. It's under 'Predefined Searches' in the
Cookbook.
hth, p
More information about the Dbix-class
mailing list