Because you template is cached, you need move code to controller. Morbo dosn't cache templates and this construction works.
четверг, 21 августа 2014 г. пользователь Stefan Adams написал: > I have a template: > > % use List::Util 'shuffle'; > % my @roster = shuffle @$roster; > > And when using hypnotoad I don't get a new randomized roster list on every > page refresh. It seems that I have about 4 possible randomized lists that > my browser may display, presumale because I have 4 hypnotoad processes > running and handling requests. > > I assume this is expected. What can I do to get the behavior that I'm > looking for which is a randomized list on every page refresh? > > Naturally, with morbo, it's a new randomized list on every page refresh. > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','mojolicious%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- С уважением. Ильиных Денис -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
