SHARE
TWEET

Untitled

a guest Mar 7th, 2013 41 Never
  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. };
RAW Paste Data
Top