in reply to Re^2: Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)
in thread Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)
If you pass $a and $b explicitly, you might be able to reuse that sub outside of sort. The "efficiency" of the implicit $a and $b is not really a big deal.
$obj->_compare($a,$b)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)
by anonymized user 468275 (Curate) on Jun 01, 2016 at 16:21 UTC | |
by Anonymous Monk on Jun 01, 2016 at 16:26 UTC |