On 6/19/07, Michael Reece <[EMAIL PROTECTED]> wrote:

i believe you are getting an array-ref because you are calling it in list
context via the [ ... ] here.

  my $myalums  = [ $c->model('MyDB::Alumni')->search({}, { rows => 20  })
] ;


try:

    my $myalums_iter  = $c->model('MyDB::Alumni')->search({}, { rows =>
20  });
    while (my $alum = $myalums_iter->next) { ... }




You are correct (and I did explain that as well in my original post that was
happening).  So the question is , how can I make the same call and access
the data in both places?  It seems silly that I have to make the call
without brackets to access in the controller, and with brackets to access in
the template, so I assume I am accessing the object incorrectly in one place
or the other, but I would like to be able to use ->next in the controller.


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