Zonema...NSArray(3pm)

πŸ’– Zonemaster::Engine::NSArray πŸ’–

okay bestie, welcome to the perl docs for Zonemaster::Engine::NSArray β€” it's part of the User Contributed Perl Documentation collection, and it's genuinely such a clever little class, i'm obsessed 🫢

✨ NAME ✨

Zonemaster::Engine::NSArray β€” a class that implements arrays which lazily look up name server addresses from their names. like, it doesn't do the work until it absolutely has to. main character energy fr πŸ’…

✨ SYNOPSIS ✨

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

that's it, that's the whole vibe. you tie a regular old array to this class and hand it a list of names, and it handles the rest 🌸

✨ DESCRIPTION ✨

so here's the tea β˜• β€” this class gets used for the "glue" and "ns" attributes of the Zonemaster::Engine::Zone class. you seed it with a list of names, and those names get expanded into proper Zonemaster::Engine::Nameserver objects on demand β€” not all at once, only when someone actually asks for them. iconic behavior, no cap πŸ’–

⚠️ but be careful bestie!! watch out for Perl functions that act on whole arrays β€” especially foreach β€” because they will usually force the entire array to expand, which completely negates the whole point of the lazy-loading. the whole slay is ruined 😭 so like… don't do that unless you mean to.

✨ METHODS ✨

these are all the methods that implement the Perl tie interface. they have no independent use β€” like, they only exist to make the tie magic work, that's their whole job 🧚

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

✨ AUTHOR ✨

Calle Dybedahl, <calle at init.se> β€” shoutout to the author, we love a legend πŸ‘‘


and that's a wrap bestie πŸŽ€ this page comes to you courtesy of perl v5.40.1, dated 2026-03-21, in the Zonema...NSArray(3pm) era πŸ’œ go forth and let your arrays be lazy (in the good way) βœ¨πŸ¦‹

πŸ“¦ where this page comes from