Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8125321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:46:41+00:00 2026-06-06T06:46:41+00:00

In a client application I have a DBIx::Class model ‘Todo’ that can be linked

  • 0

In a client application I have a DBIx::Class model ‘Todo’ that can be linked to a number of other models using a many-to-many relation.
I know, because of business logic, that 1 and only 1 foreign model is linked to it. I want to fetch that model in my query using:

my $objects = $c->model('DB')->resultset('Todo')->search($myFilter,{
    prefetch => \@relations # contains all possible relations
});

Like the documentation states DBIx::Class::ResultSource warns about this:

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

Can anyone tell me how to prevent this error without resorting to editing DBIx::Class::ResultSource itself? I see no other way of doing what I want and want to prevent the application dumping a lot of warnings in the log. I have tried fiddling with @CARP_NOT and $Carp::Internal, but cannot get Carp from skipping this warning (the documentation on this is sparse at best)

If anyone could help me that would be awesome, thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:46:42+00:00Added an answer on June 6, 2026 at 6:46 am

    You could override the default handling of warning signals to catch and ignore this specific warning:

    $SIG{__WARN__} = sub {
      my $warn_msg = $_[0];
      if ( $warn_msg =~ m/Prefetching multiple has_many rels accountbalances_todos/ ) {
        # do nothing
      } else {
        warn $warn_msg;
      }
    };
    

    or, if you prefer,

    $SIG{__WARN__} = sub {
      warn $_[0] unless $_[0] =~ m/Prefetching multiple has_many rels accountbalances_todos/
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a client application that needs to send messages to a server for
I have an internal WPF client application that accesses a database. The application is
I have a client application (C++, Windows) that opens sockets, connects to a server,
I have a SignalR client application that receives a Json serialized list of objects.
I have a client application that scrapes data into a raw table. This client
Technology(Java EE 6 with Glassfish 3.1, Netbeans 7.0) I have an application client that
I have a client application (WPF, C#, .net4) which uses POCO entity model connected
I have a client application that represents the complete SharePoint structure (sitecollections, sites &
I have a WCF client application that consists of about 5 proxies that all
I have a client application (iPhone) that collects 10,000 doubles. I'd like to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.