On Thu, 5 Mar 2009, kevin montuori wrote:
"PR" == Peter Rabbitson <[email protected]> writes:
>> You put ResultSetManager in your load_components and you put your custom
>> plugin for resultset into a load_resultset_components call. An example
>> from one of my classes.
PR> Isn't ResultSetManager deprecated to the point of removal?
it's tagged "experimental" but not deprecated. i hope it's not going
away, i get a lot of use out of it.
It is going away. Since you can replace it with very few lines of code, it
doesnt have much reason for existance.
Instead of writing:
sub mymethod : ResultSet { .. }
write:
__PACKAGE__->resultset_class('My::ResultSet');
And later:
package My::ResultSet;
use base 'DBIx::Class::ResultSet';
sub mymethod { .. }
1;
You can even have that bit at the bottom of your result class, if you dont
want to create a new one.
Current best practice suggests you create a new class, have your schema
laid out as:
Schema/Result/Books.pm
Schema/ResultSet/Books.pm
and use load_namespaces, in Schema.pm
See docs ;)
Jess
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]