DBM::D...terator(3pm)

πŸ’… NAME πŸ’…

DBM::Deep::Iterator β€” the iterator for FIRSTKEY() and NEXTKEY(), bestie ✨

(also, hi, you found the page β€” it's from the User Contributed Perl Documentation corner of the manual, and the header up top is literally DBM::D...terator(3pm) because the name got truncated mid-word. iconic behavior honestly πŸŽ€)


🎯 PURPOSE 🎯

okay so listen β€” this is an internal-use-only object for DBM::Deep. that's the whole vibe. it's the iterator that powers FIRSTKEY() and NEXTKEY(). no cap, that's it. you're not supposed to be out here instantiating it yourself, it's a backstage-pass situation 🫢


πŸ¦‹ OVERVIEW πŸ¦‹

this object

(no fr that's the entire overview. the manpage said "This object" and then just ✨ left ✨. we respect the mystery πŸ’€)


πŸ‘‘ METHODS πŸ‘‘

🌸 new(\%params)

the constructor, she takes a hashref of params πŸ’– the hashref is assumed to have these elements in it:

  • engine β€” of type DBM::Deep::Engine (and yes, the original literally leaves that paren hanging open, we're keeping it exactly as written, iykyk)
  • base_offset β€” the base_offset of the invoking DBM::Deep object

🧚 reset()

this method takes no arguments. periodt.

what she does: resets the iterator so it starts from the beginning again. fresh start, main character energy, we love a glow-up πŸ”₯

what she returns: nothing. that's right, nothing at all. don't come looking for a return value, there isn't one πŸ™ˆ

⭐ get_next_key( $obj )

that's the signature. get_next_key( $obj ). and that's... literally all the manpage gives us 😭 no description, no return details, nothing. she said "here's my name, don't ask questions" and honestly? respect πŸ’…


lowkey reminder bestie: this whole object is internal-use-only. it's plumbing. gorgeous, functional plumbing, but plumbing 🫢

and that's the page!! 🌈 written up in the User Contributed Perl Documentation set, shipped with perl v5.42.0, dated 2023-11-13 β€” mwah, go read your FIRSTKEY() and NEXTKEY() docs, love u, bye πŸ’œπŸŽ€

πŸ“¦ where this page comes from