Net::R...Parser(3pm)

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

πŸ’… Net::R...Parser(3pm) β€” bestie edition ✨

okay so this is a page from the User Contributed Perl Documentation, and the manual name is Net::R...Parser(3pm). yes it's abbreviated, yes that's on purpose, we don't ask questions πŸ’–


✨ NAME ✨

Net::Route::Parser β€” it's an Internal class. that's it. that's the whole name section. lowkey iconic for being so short.


🌸 SYNOPSIS 🌸

Not used directly.

fr fr. you do not touch this one yourself. it's giving backstage pass, not main character. πŸŽ€


πŸ¦‹ VERSION πŸ¦‹

Revision $Revision: 363 $.

that's the version, bestie. no notes. ⭐


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜•: this is a base class for all the system-specific parsers. it is not usable directly β€” it's abstract, meaning it's the blueprint, not the build. no cap.

if you're writing a parser for a specific system, you should inherit from this class so you get all the shared, common functionality for free. it's literally the group project starter pack β€” everybody builds on the same base so nobody has to redo the boring bits. 🫢


πŸ‘‘ INTERFACE πŸ‘‘

heads up babes: this interface is subject to change until version 1. so don't get too attached to any of it, okay? it's giving "situationship with the API." 😭

🧚 Object Methods

  • from_system() β€” this is the implementation of Net::Route::Table::from_system(). it's the behind-the-scenes girlie that makes the whole thing go. πŸ’«
  • command_line() [pure virtual] β€” this is where you tell it what you want to read the information from. and you get to pick your format, bestie:
    • a string β€” it will undergo shell expansion. so the shell gets to do its little shell things to it. 🐚
    • an arrayref β€” the command and its arguments, and no shell expansion happens. safe and literal, no surprises.
you must implement this in your subclasses. it's pure virtual, so it's on you. no skipping. πŸ’…
  • parse_routes( $text_lines_ref ) [pure virtual] β€” this one reads and parses the routes out of the output of the command, and hands you back an arrayref of Net::Route objects. cute, tidy, ready to use. πŸŽ€
also pure virtual β€” implement it in your subclasses, queen. πŸ‘‘
  • create_ip_object ( $address, $mask ) β€” a factory of NetAddr::IP objects, so that error management lives in one centralized place instead of getting copy-pasted everywhere (we love DRY, we hate spaghetti 🍝). and listen: it dies if the arguments don't actually form a valid IP or network address. so pass it real addresses, bestie, or it will simply perish. πŸ’€

🌈 AUTHOR 🌈

  • Created by Alexandre Storoz</>, "<astoroz@straton-it.fr>"
  • Maintained by Thomas Equeter</>, "<tequeter@straton-it.fr>"

shoutout to the devs, they ate and left no crumbs. 🫢✨


Copyright (C) 2009 Straton IT</>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt. πŸ’…


and that's the whole page, bestie!! this one shipped as perl v5.36.0 on 2023-06-15 β€” go forth and inherit responsibly, mwah πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from