This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add note on how to write NEXTKEY when you can't just wrap around each()
authorDavid Cantrell <david@cantrell.org.uk>
Mon, 30 Nov 2020 22:50:00 +0000 (22:50 +0000)
committerKarl Williamson <khw@cpan.org>
Thu, 3 Dec 2020 02:40:29 +0000 (19:40 -0700)
pod/perltie.pod

index 6f87059..cea7a6f 100644 (file)
@@ -811,6 +811,11 @@ thing, but we'll have to go through the LIST field indirectly.
        return each $self->{LIST}->%*
     }
 
+If the object underlying your tied hash isn't a real hash and you don't have
+C<each> available, then you should return C<undef> or the empty list once you've
+reached the end of your list of keys. See L<C<each's own documentation>|perlfunc/each>
+for more details.
+
 =item SCALAR this
 X<SCALAR>