Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. my $boob = $c->model('Db::Boob');
  2.  
  3. $c->session->{boobs} = [] unless ($c->session->{boobs});
  4. my $row;
  5. unless ($row = shift(@{$c->session->{boobs}})){
  6. my (@rows) = $boob->search(undef, {rows => 10, order_by => 'RANDOM()'});
  7. push(@{$c->session->{boobs}}, @rows);
  8.  
  9. $row = shift(@{$c->session->{boobs}});
  10. }
  11.  
  12. $c->stash( row => $row );
  13. $c->stash(content_class=>'index');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement