Net::DNS::RR::APL(3)

πŸ’… Net::DNS::RR::APL πŸ’…

okay bestie so you're looking at Net::DNS::RR::APL(3), the perl manual page for the DNS APL resource record, and honestly? it's giving niche-but-iconic. let's get into it πŸ¦‹


✨ NAME ✨

Net::DNS::RR::APL β€” the DNS APL resource record. that's it, that's the vibe. πŸŽ€


🌸 SYNOPSIS 🌸

        use Net::DNS;
        $rr = Net::DNS::RR->new('name IN APL aplist');

like, that's the whole entrance. iconic behavior only ✨


πŸ’– DESCRIPTION πŸ’–

DNS Address Prefix List (APL) record. yes queen, it's a list of address prefixes, and we stan a structured queen πŸ‘‘


πŸ”₯ METHODS πŸ”₯

so the available methods are the ones inherited from the base class, PLUS the type-specific methods defined in this package. best of both worlds fr fr 🫢

quick warning bestie: use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour. like... do not go poking around in there πŸ’€ please. the API is right there, use it πŸ™ˆ

πŸ“ aplist πŸ“

        @aplist = $rr->aplist;

        @aplist = $rr->aplist( '1:192.168.32.0/21', '!1:192.168.38.0/28' );

        @aplist = $rr->aplist( '1:224.0.0.0/4', '2:FF00:0:0:0:0:0:0:0/8' );

        @aplist = $rr->aplist(
                        negate  => 1,
                        family  => 1,
                        address => '192.168.38.0',
                        prefix  => 28,
                        );

this gives you the ordered, possibly empty, list of address prefix items. and if you pass additional items? they get appended to the existing list with neither prefix aggregation nor reordering. no merging, no sorting, no glow-up β€” just straight-up appended at the end, exactly as handed over. periodt πŸ’…

🧚 Net::DNS::RR::APL::Item 🧚

every element of the prefix list is a Net::DNS::RR::APL::Item object which is inextricably bound to the APL record that created it. like, soulmate energy. they come as a set, you can't separate them, no cap πŸ”—

🌈 negate 🌈

        $rr->negate(1);

        if ( $rr->negate ) {
                ...
        }

boolean attribute indicating the prefix is an address range exclusion. i.e. this prefix is not invited to the party πŸ™…β€β™€οΈ

⭐ family ⭐

        $family = $rr->family;
        $rr->family( $family );

address family discriminant. it tells you which address family you're dealing with β€” that's its whole job and it does it well πŸ‘‘

πŸ¦‹ prefix πŸ¦‹

        $prefix = $rr->prefix;
        $rr->prefix( $prefix );

number of bits comprising the address prefix. yes, just a number of bits. simple, elegant, ate πŸ’–

🌸 address 🌸

        $address = $object->address;

address portion of the prefix list item. the literal address part, right there, living its best life ✨

πŸ’œ string πŸ’œ

        $string = $object->string;

returns the prefix list item in the form required in zone files. zone-file-ready, camera-ready, main character energy πŸ“Έ


Copyright (c)2008 Olaf Kolkman, NLnet Labs.

Portions Copyright (c)2011,2017 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.


πŸ’€ LICENSE πŸ’€

okay so the legal bit, but make it cute (the words stay the same tho, bestie, don't come for me):

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

tl;dr: no warranty, be normal about the copyright notices, don't use the author's name to sell your fork πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

iykyk, go read the RFC, it's right there πŸ’…


and that's the page, bestie!! this little gem shipped with perl v5.42.0, dated 2026-09-02, and it's filed under Net::DNS::RR::APL(3) 🫢✨ go forth and prefix-list responsibly πŸŒˆπŸ’–

πŸ“¦ where this page comes from