>
> The first example sure looks like a hash element being passed and the 
> second example, a string, neither of which appear to be a callback or 
> method reference shown in the documentation.
>

I've updated the example, it should be a little more obvious now.

  
  https://github.com/kraih/mojo/commit/eb79af2c1bc49bd7eef6730896af333b1e4d1068
 

> And one more newbie question, is there a good reason (e.g., backward 
> compatibility with earlier releases) to use the Mojo::Collection to_array 
> <http://mojolicious.org/perldoc/Mojo/Collection#to_array> method to 
> access an element of a Mojo::Collection?
>

The to_array method is actually less backwards compatible, and exists for 
stuff like "$c->render(json => $collection->to_array);". ;)

--
sebastian

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to