in reply to sort by variable, configurable fields
Sort::MultipleFields
You may also find the code educational as a use of closures - it was in fact written primarily as an example of their use.