<div dir="ltr"><div>Interesting problem today.  Running 0.082800.</div><div><br></div><div>I don&#39;t have much to go on here, but maybe someone has seen this before.</div><div><br></div><div>This line of code in my &quot;User&quot; Result class was throwing an exception.  It&#39;s in a Moose builder:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>return $self-&gt;related_resultset( &#39;user_role&#39; )-&gt;my_method-&gt;count &gt; 0;</div></blockquote><div><br></div><div>saying:</div><div><br></div><div>Can&#39;t locate object method &quot;my_method&quot; via package &quot;App::DB::ResultSet&quot;   </div><div><br></div><div>That method &quot;my_method&quot; is not in App::DB::ResultSet.  It is in App::DB::ResultSet::UserRole.</div><div>I&#39;m expecting that related_resultset( &#39;user_role&#39; ) would return App::DB::ResultSet::UserRole.<br></div><div><br></div><div>And, well, it does when run outside of mod_perl.  And now, after quite a few Apache restarts and adding some debugging code, it is now returning App::DB::ResultSet::UserRole.</div><div><br></div><div>Has anyone had a case where related_resultset() returns a ResultSet object?</div><div><br></div><div><br></div><div>FWIW, the relationship is defined as so in Result::User:</div><div><br></div><div><div>__PACKAGE__-&gt;has_many(</div><div>    &#39;user_role&#39;,</div><div>    &#39;App::DB::Result::UserRole&#39;,</div><div>    { &#39;foreign.user_id&#39; =&gt; &#39;<a href="http://self.id">self.id</a>&#39; },</div><div>);</div></div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a></div>
</div>