<tt><font size=2>John Romkey <romkey@romkey.com> 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>
<br><tt><font size=2>my @data = $data_scalar->all;</font></tt>