On Wed, Feb 13, 2002 at 03:37:48PM -0600, Richard Tietjen wrote:
>     sort, nsort
>     ... 
>     Where the list contains hash array references, a hash key can be
>     passed as an argument to specify the sort field.

Oooh. I'd never noticed this before.

Can I ask if it would be possible to extend this to objects as well?

  Where the list contains objects, a method name can be passed as an
  argument to specify the sort order?

So, if I had a list of 'book' objects rather than a list of hashrefs, I
could still do
>       [% library = books.sort('author') %]

But could also do:
>       [% library = books.sort('title') %]

Or whatever.

Thanks,

Tony
-- 
--------------------------------------------------------------------------
 Tony Bowden | [EMAIL PROTECTED] | http://www.tmtm.com/
             we barely have time to react in this world let alone rehearse
--------------------------------------------------------------------------


Reply via email to