Not to get in the way here... but I think (not a Dbix::Class/Catalyst expert) that Len is saying that:
putting {accounts => $rs and pager => $rs->pager()}in the stash is effectively forcing the template system to make DB calls. It has to be even though Kenneth didn't actually post his template code. At first I thought it was just the pager, but I re-read and saw the $rs itself was passed. But I am not posting this just to pile on (and in fact, I could well be wrong -- or correct materially but wrong in details)... but I want to ask Len: What is bad about this design? Especially in a case where the pager (possibly not this one) has to fetch pages? Is the (your) preferred design pattern to put any UI fetches behind a webservice/ajax call? Thanks, Ben On Jun 20, 2012, at 8:04 AM, Len Jaffe wrote: > On Wed, Jun 20, 2012 at 8:53 AM, Kenneth S Mclane <ksmcl...@us.ibm.com> wrote: > Len Jaffe <lenja...@jaffesystems.com> wrote on 06/19/2012 04:29:53 PM: > > Wow, way to jump to a conclusion. I am not making a DB call from my template, > I just added an IF so if the field is null it displays a "0" instead of > nothing, just a readability issue. :-) > > Sorry if you think I jumped anywhere. > I assure you my conclusion was well-reasoned and reached via careful > deliberation. > > L > -- Ben Hitz Senior Scientific Programmer ** Saccharomyces Genome Database ** GO Consortium Stanford University ** h...@stanford.edu
_______________________________________________ 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/dbix-class@lists.scsys.co.uk