<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 9, 2012, at 2:04 PM, Kenneth S Mclane wrote:</div><blockquote type="cite"><tt><font size="2">John Romkey &lt;<a href="mailto:romkey@romkey.com">romkey@romkey.com</a>&gt; wrote on 07/09/2012
12:25:31 PM:<br>
<br>
&gt; &gt; <br>
&gt; &gt; Try: <br>
&gt; &gt; <br>
&gt; &gt; while( my $data_scalar = $sr-&gt;next ) &nbsp;{ <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; my @data = $data_scalar-&gt;all; <br>
&gt; &gt; <br>
&gt; &gt; instead <br>
&gt; &gt; <br>
&gt; <br>
&gt; I actually changed it to this: my @data = $sr-&gt;all; I think this
is <br>
&gt; equivalent isn't it? This does not give me any errors, but only <br>
&gt; outputs one row to the file.</font></tt>
<br><tt><font size="2">&gt; <br>
&gt; $sr is your resultset</font></tt>
<br><tt><font size="2">&gt; <br>
&gt; $sr-&gt;next gives you the next row</font></tt>
<br><tt><font size="2">&gt; <br>
&gt; $sr-&gt;all gives you all records</font></tt>
<br><tt><font size="2">&gt; <br>
&gt; </font></tt><a href="http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSet.pm#all"><tt><font size="2">http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSet.pm#all</font></tt></a>
<br><tt><font size="2">&gt; <br>
&gt; in my example $data_scalar-&gt;all will return the values of all the
<br>
&gt; columns in that row - very different from getting all the rows in
<br>
&gt; the resultset</font></tt>
<br><tt><font size="2">&gt; - john romkey</font></tt>
<br><tt><font size="2">&gt; </font></tt><a href="http://romkey.com/"><tt><font size="2">http://romkey.com/</font></tt></a>
<br>
<br><tt><font size="2">OK, I changed the code to your suggestion, but it
resulted in this error:</font></tt>
<br>
<br><tt><font size="2">[error] Caught exception in dbms::Controller::AccountView-&gt;list
"Can't locate object method "all" via package "dbms::Model::ORANGES::Accountv"
at /opt/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm line
56." that is pointing at this line:</font></tt>
<br></blockquote></div><br><div>Sorry Kenneth, I have had multiple brainfarts here. &nbsp;I shouldn't try to be helpful on inadequate coffee. I think I just lost my Perl/DBIx::Class coding privileges. ;) You should just ignore me; I'm not making sense right now ;)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- john</div><div><br></div></body></html>