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

🌸 NAME 🌸

DBM::Deep::Iterator::Index β€” mediate between DBM::Deep::Iterator and DBM::Deep::Engine::Sector::Index. This is the DBM::D...:Index(3pm) page from the User Contributed Perl Documentation, and it's an internal-use-only object for DBM::Deep, bestie πŸ’….

πŸŽ€ PURPOSE πŸŽ€

okay so picture this: this object is internal-use-only for DBM::Deep ✨. It's the mediator between a DBM::Deep::Iterator object and a DBM::Deep::Engine::Sector::Index sector. That's the whole job. It's giving matchmaker but for iteration internals πŸ’–.

πŸ¦‹ OVERVIEW πŸ¦‹

Now the plot twist πŸ‘€: even though the class name implies a hierarchy, this object does NOT inherit from DBM::Deep::Iterator. Not even a little. Instead, it delegates to it, essentially acting as a facade over it. So it's like "bestie I got you" and forwards the vibe πŸ’….

"get_next_key" in DBM::Deep::Iterator will instantiate one of these objects as needed to handle an Index sector. That's the hookup. Periodt.

πŸ‘‘ METHODS πŸ‘‘

πŸ“ new(\%params) πŸ“

The constructor takes a hashref of params and blesses it into the invoking class. Cute. The hashref is assumed to have the following elements:

  • iterator (of type DBM::Deep::Iterator
  • sector (of type DBM::Deep::Engine::Sector::Index

🌈 at_end() 🌈

This takes no arguments. Full stop.

It returns true/false indicating whether this sector has any more elements that can be iterated over. Basically vibe check: are we done or is there more? πŸ’€

πŸ’œ get_next_iterator() πŸ’œ

This takes no arguments.

This returns an iterator (built by "get_sector_iterator" in DBM::Deep::Iterator) based on the sector pointed to by the next occupied location in this index. It's giving "next stop on the sector tour" 🚌✨.

If the sector is exhausted, it returns nothing. No iterator, no drama, just nothing πŸ™ˆ.


mwah πŸ’‹ that's the whole page. source/version: perl v5.42.0; date: 2023-11-13; manual name: DBM::D...:Index(3pm). catch you in the next sector, bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from