in reply to Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)
The syntax for custom sort routines is sometimes tricky to get right - towards the end of the sort page there are some examples of the syntax. It sounds like your problem might be fixed with the syntax sort {$obj->_DBsort4create(...args...)} keys %$csvQ, but I'm not sure as you haven't provided runnable example code...
As for your second question, I haven't yet wrapped my head around the potential problem you're describing (no sample code that demonstrates the infinite loop?), but if you're asking about optimizing the sort, then maybe a Schwartzian transform will help?
Regards,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)
by anonymized user 468275 (Curate) on Jun 01, 2016 at 17:08 UTC | |
by haukex (Archbishop) on Jun 01, 2016 at 18:29 UTC | |
by anonymized user 468275 (Curate) on Jun 02, 2016 at 06:41 UTC | |
by tye (Sage) on Jun 02, 2016 at 07:32 UTC | |
by haukex (Archbishop) on Jun 02, 2016 at 08:29 UTC | |
by anonymized user 468275 (Curate) on Jun 02, 2016 at 10:51 UTC |