Iterator interface #129

scrottie opened this Issue Apr 29, 2010 · 0 comments


None yet

1 participant


Arrays (autoboxed), hashes, IO handles, and perhaps other things should offer a consistent iterator interface.

This needs some comments. As of 5.12, each works on arrays as well as hashes but doesn't seem to work on references. Tied hashes support each() through FIRSTKEY and NEXTKEY. I wonder if the built in each() works correctly on tied arrays now -- probably. Does perl5i shy away from tie'ing things (guessing so)? Other language define methods along the lines of: get_next_record_and_advance, get_current_record_and_dont_advance, and is_there_a_next_record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment