<tt><font size=2>&gt; Subject:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Re: [Dbix-class] Problem getting data from resultset</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; <br>
&gt; foreach my $method (split(/\./, $field)) {<br>
&gt; &nbsp; &nbsp; last unless ($val);<br>
&gt; &nbsp; &nbsp; $val = $val-&gt;$method;<br>
&gt; }<br>
&gt; <br>
&gt; should solve this.<br>
&gt; <br>
&gt; &nbsp; &nbsp; patrick<br>
&gt; <br>
&gt; -- <br>
That just causes an infinite loop somewhere. I have been trying an if (exists
$val-&gt;$method) { $val= $val-&gt;$method; } else { $val = 0; }, but that
gets me this:</font></tt>
<br><tt><font size=2>exists argument is not a subroutine name at /opt/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm
line 71.</font></tt>
<br><tt><font size=2>I changed it to this: if (exists $val-&gt;$method)
{ $val= $val-&gt;{$method}; } else { $val = 0; } and it gets me this:</font></tt>
<br><tt><font size=2>Caught exception in dbms::Controller::AccountView-&gt;list
&quot;Can't use string (&quot;0&quot;) as a HASH ref while &quot;strict
refs&quot; in use.</font></tt>
<br>
<br><tt><font size=2>I think I'm on the right track, I think I still don't
have it laid out quite right.<br>
</font></tt>