in reply to Re^2: How can I access object data in a user defined sort cmp function?
in thread How can I access object data in a user defined sort cmp function?
it is not very elegant, b/c - sorry - you are violating OOP and encapsulation.
The best design is to add a method %keys=$obj->sort_keys_by_val() which returns your keys.
No need to tunnel $self artificially cause $self will be the first argument.
the code for this method can be taken from here
|
|---|