For the
wantarray, i see the usefulness, but i was commenting on moving the
return outside of the
?:. It's not really a big deal, but it would look something like:
return wantarray ? ($_,'blah') : $_;
For the end hook, you have a start index, you can receive an extra scalar as the end index, and only pick it up if they've put in a start index as well. Prototype would be kinda like:
findone { code } @list
findone { code } @list, $start_index
findone { code } @list, $start_index, $end_index
So if they know they don't need to walk further than a certain place on the array they can be certain to stop there.
jynx