<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 <<a href="mailto:romkey@romkey.com">romkey@romkey.com</a>> wrote on 07/09/2012
12:25:31 PM:<br>
<br>
> > <br>
> > Try: <br>
> > <br>
> > while( my $data_scalar = $sr->next ) { <br>
> > my @data = $data_scalar->all; <br>
> > <br>
> > instead <br>
> > <br>
> <br>
> I actually changed it to this: my @data = $sr->all; I think this
is <br>
> equivalent isn't it? This does not give me any errors, but only <br>
> outputs one row to the file.</font></tt>
<br><tt><font size="2">> <br>
> $sr is your resultset</font></tt>
<br><tt><font size="2">> <br>
> $sr->next gives you the next row</font></tt>
<br><tt><font size="2">> <br>
> $sr->all gives you all records</font></tt>
<br><tt><font size="2">> <br>
> </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">> <br>
> in my example $data_scalar->all will return the values of all the
<br>
> columns in that row - very different from getting all the rows in
<br>
> the resultset</font></tt>
<br><tt><font size="2">> - john romkey</font></tt>
<br><tt><font size="2">> </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->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. 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>