<tt><font size=2>> Subject:</font></tt>
<br><tt><font size=2>> <br>
> Re: [Dbix-class] Problem getting data from resultset</font></tt>
<br><tt><font size=2>> <br>
> <br>
> foreach my $method (split(/\./, $field)) {<br>
> last unless ($val);<br>
> $val = $val->$method;<br>
> }<br>
> <br>
> should solve this.<br>
> <br>
> patrick<br>
> <br>
> -- <br>
That just causes an infinite loop somewhere. I have been trying an if (exists
$val->$method) { $val= $val->$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->$method)
{ $val= $val->{$method}; } else { $val = 0; } and it gets me this:</font></tt>
<br><tt><font size=2>Caught exception in dbms::Controller::AccountView->list
"Can't use string ("0") as a HASH ref while "strict
refs" 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>