Thanks for following up!
- The order is the order given in the constructor - qw(first second third ...).
- "sufficiently trivial" --- that would explain why I couldn't find a module.
Use case: I am writing a build system (why not? :D ) that runs several phases of processing in order. I need to:
- Move from one phase to its successor phase over the course of execution (therefore, $nextphase = $phases->after($thisphase); and
- Map from a command-line parameter provided by the user to a phase, if the user wants to repeat a phase or skip ahead (therefore, case-insensitive lookup).
I am using string phase names rather than phase numbers because I don't want the user to have to remember the numbers.