[Dbix-class] Creating custom ResultSet Class.

Oleg Pronin syber.rus at gmail.com
Thu Apr 26 23:09:53 GMT 2007


Could you please give more details :)

2007/4/27, Jess Robinson <castaway at desert-island.me.uk>:
>
>
>
>
> On Thu, 26 Apr 2007, Oleg Pronin wrote:
>
> > Hello!
> >
> > I want to create custom resultset class that will allow caching (in
> > memcached) functionality.
> >
> > For example,
> > @users =3D $rs->search(undef, {order_by =3D> 'rating', rows =3D> 10, me=
mcache
> =3D>
> > 60});
> >
> > This will give stored in memcached and automatically updated every 60
> > seconds top10 users list.
> >
> > To do that i need every resultsource to use my resultset class.
> > Cookbook says i've got to
> > $source->resultset_class('My::ResultSet::Class');
> > But i dont want to write it in every result source!
> >
> > Is there a good way to set my custom resultset to all registered result
> > sources?
> >
>
> Yes, its a perl feature called a "base class" ;)
>
> Jess
>
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
> http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070427/db6=
348fa/attachment.htm


More information about the Dbix-class mailing list