Zonema...NSArray(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

πŸ’– NAME πŸ’–

Zonemaster::NSArray β€” a class that implements arrays which lazily look up name server addresses from their names. yes bestie, lazy in the good way πŸ¦‹


✨ SYNOPSIS ✨

tie @ary, 'Zonemaster::NSArray', @ns_names

that's it. that's the whole vibe. one tie and you're iconic πŸ’…


🌸 DESCRIPTION 🌸

okay so listen. This class is what powers the "glue" and "ns" attributes over in the Zonemaster::Zone class. You seed it with a list of names, and those names get expanded into full-blown Zonemaster::Nameserver objects on demand β€” not all at once, not right now, only when someone actually asks. that's the lazy-loading serve πŸŽ€

⚠️ but bestie, be careful with Perl functions that act on whole arrays β€” especially foreach. They will usually force the entire array to expand, which completely negates the whole point of the lazy-loading. it's giving "why did we even bother" 😭 so like, don't do that.

πŸ‘‘ METHODS πŸ‘‘

ngl these are all just methods implementing the Perl tie interface. They have no independent use β€” they exist for the tie magic and nothing else. still gonna list every single one tho because we respect the craft πŸ’–

  • TIEARRAY
  • STORE
  • STORESIZE
  • FETCH
  • FETCHSIZE
  • EXISTS
  • DELETE
  • CLEAR
  • PUSH
  • UNSHIFT
  • POP
  • SHIFT
  • SPLICE
  • UNTIE

🫢 AUTHOR 🫢

Calle Dybedahl, <calle at init.se> β€” thank you for your service king πŸ‘‘


and that's the whole page, bestie. this beauty shipped as part of perl v5.32.0 and got its timestamp on 2021-01-06, filed under Zonema...NSArray(3pm) in the User Contributed Perl Documentation. slay, read it again sometime πŸ’œβœ¨

πŸ“¦ where this page comes from