Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 7th, 2013  |  syntax: None  |  size: 0.70 KB  |  views: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. my $objects = $c->model('DB')->resultset('Todo')->search($myFilter,{
  2.     prefetch => @relations # contains all possible relations
  3. });
  4.        
  5. DBIx::Class::ResultSet::next(): Prefetching multiple has_many rels accountbalances_todos and accounts_todos at top level will explode the number of row objects retrievable via ->next or ->all. Use at your own risk. at /media/psf/projects/.../Controller/Todo.pm line 117
  6.        
  7. $SIG{__WARN__} = sub {
  8.   my $warn_msg = $_[0];
  9.   if ( $warn_msg =~ m/Prefetching multiple has_many rels accountbalances_todos/ ) {
  10.     # do nothing
  11.   } else {
  12.     warn $warn_msg;
  13.   }
  14. };
  15.        
  16. $SIG{__WARN__} = sub {
  17.   warn $_[0] unless $_[0] =~ m/Prefetching multiple has_many rels accountbalances_todos/
  18. };