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 π§
TIEARRAYSTORESTORESIZEFETCHFETCHSIZEEXISTSDELETECLEARPUSHUNSHIFTPOPSHIFTSPLICEUNTIE
β¨ 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
- ubuntu stonking: libzonemaster-perl 8.001.001-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms