Net::I...e::Node(3pm)

πŸ“¦
version 0.7 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Net::IPTrie::Node β€” bestie, this is the module that implements attributes and behavior for nodes inside the trie πŸ’–

So like, a Net::IPTrie::Node is one little node chillin' inside a Net::IPTrie tree, and this page is the whole glow-up guide for it πŸ‘‘


🌸 SYNOPSIS 🌸

See Net::IPTrie

πŸ¦‹ DESCRIPTION πŸ¦‹

See Net::IPTrie

(no fr, that's literally all it says here β€” the real tea is over in Net::IPTrie 🫢)


πŸ‘‘ CLASS METHODS πŸ‘‘

πŸ’… new - Constructor

okay so this is the moment where a fresh node gets born, main character energy only ✨

Arguments:

  • up β€” the parent node (your node's mom, basically)
  • left β€” the left child node
  • right β€” the right child node
  • address β€” the address string
  • prefix β€” the IP prefix (and it defaults to the host mask, fyi)
  • iaddress β€” the integer address
  • data β€” a scalar, and ngl it could be a reference to literally any data structure you want πŸ“

Returns:

A brand new Net::IPTrie::Node object πŸŽ€

Examples:

my $n = Net::IPTrie::Node->new(up=>$up, address=>"10.0.0.1")

🌈 INSTANCE METHODS 🌈

🧚 parent - Find closest parent node with IP information

climbing up the family tree to find the nearest ancestor that actually has IP info, periodt πŸ’œ

Arguments:

None πŸ™ˆ

Returns:

A node object with an address β€” or undef if there's nobody up there 😭

Examples:

my $parent = $node->parent;

πŸ’€ delete - Delete an IP node from the tree

⚠️ lowkey important: the node is actually emptied, not deleted. The way it's still there but with nothing in it?? it's giving ghosting fr fr πŸ‘»

Arguments:

None πŸ™ˆ

Returns:

The deleted (empty) Node object 🫢

Examples:

my $n = $tr->find("10.0.0.1");
$n->delete();

πŸ’œ AUTHOR πŸ’œ

Carlos Vicente <cvicente@cpan.org> β€” icon, legend, the moment 🫑


⭐ SEE ALSO ⭐

  • Net::IPTrie

Copyright (c) 2007-2010, Carlos Vicente <cvicente@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.


πŸ”₯ DISCLAIMER OF WARRANTY πŸ”₯

okay bestie this part is ALL CAPS and kinda scary but it's the legal stuff so we're keeping it exactly as-is, no editing, no cap 🫢

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

and that's the whole page, babe πŸŽ€ this lil doc ships with perl v5.36.0 and got dated 2022-11-19, brought to you as part of the User Contributed Perl Documentation β€” stay slaying in your trie πŸ’…βœ¨

πŸ“¦ where this page comes from