On 6/20/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:

Hi John,

* John Goulah <[EMAIL PROTECTED]> [2007-06-19 19:10]:
> If I do something simple like this:
>
>     my $myalums  = [ $c->model('MyDB::Alumni')->search({}, { rows => 20
})
> ] ;
>
> But if I try to iterate this in the controller, I cannot do something
like:
>
>    while (my $alum = $myalums->next) {
>        $c->log->debug("id: ". $alum->alumni_id);
>    }

* John Goulah <[EMAIL PROTECTED]> [2007-06-19 20:25]:
>    while (my $alum = @{$myalums}->next) {
>        $c->log->debug("id: ". $alum->alumni_id);
>    }
>
> In this case I get:
>
> Can't call method "next" without a package or object reference


this is not a problem with DBIx::Class (much less with Catalyst).
Your understanding of Perl data structures is evidently
superficial; you will do yourself a favour to read at least one
of the perlreftut, perllol and perldsc docs.



Your reading of this thread is evidently superficial since it was answered
several times over with _much_ more helpful answers.   Sorry if I opened my
ignorant mouth, but I thought it fit into this list since it dealt with
model, view, and controller code.


Thanks,
John
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to