Net::Route(3pm)
π NAME π
Net::Route β a portable interface to the routing table, bestie π
β¨ SYNOPSIS β¨
use Net::Route::Table;
my $table_ref = Net::Route::Table->from_system();
my $route_ref = $table_ref->default_route();
print "Default gateway: ", $route_ref->gateway(), "\n";
πΈ VERSION πΈ
Version 0.02, $Revision: 372 $ β yes she's an elder but she still slays π
π¦ DESCRIPTION π¦
The Net::Route Module
okay so here's the tea β every single OS has its own little custom way of showing you the routing table and it's honestly chaos. Linux's route utility? Completely different from BSD's route show. And Windows' route print? A whole other vibe. Trying to parse all these different output styles inside an otherwise portable script gets inconvenient so fast π
Net::Route handles all the system-specific nonsense for you and hands you one single, portable interface. iconic behaviour honestly π
The Net::Route Class
Net::Route objects represent single entries from a Net::Route::Table. that's it, that's the vibe π
π INTERFACE π
This documents Net::Route as a class. To know how to actually use the module, go check the synopsis or Net::Route::Table β that's the entry point from a user perspective, iykyk β¨
Object Methods
destination()gateway()metric()interface()is_active()is_dynamic()
π§ INSTALLING DEPENDENCIES ON SUN SOLARIS SYSTEMS WITH GCC π§
ngl this part is a whole saga π The perl interpreter that ships with Solaris was compiled with Sun's proprietary C compiler, so it tries to compile XS modules with that same tool and those same options. But plot twist: Solaris comes by default with the GNU C Compiler (gcc) only, and gcc has its own totally incompatible set of command-line arguments. Mixing these two together to compile XS Perl modules? It does not work. periodt π
So when you need to install CPAN modules (like Net::Route's dependencies) that make use of XS (that's C code, bestie) on a system without the Sun C Compiler, you have to use the wrapper script Sun provides, which will invoke gcc correctly. Just swap in your Module as needed:
/usr/perl5/bin/perlgcc -MCPAN -e 'install Module'.
π STATUS AND ROADMAP π
Please refer to the Changes file for a detailed history, bestie π
0.01 - First Public Release
Net::Route meets our goals for a first public release:
- It can list all routes
- It can get the default route
- It can provide the most common characteristics of routes
- It is portable on Linux, Solaris and Windows
Net::Route is used in other Straton IT (<http://en.straton-it.fr/>) software, such as Cancerbero 0.7 (<http://en.straton-it.fr/open-source/cancerbero-07>) and Confdump/Sys (<http://confdump.sourceforge.net/>). π«Ά
0.xx - Community Releases
These releases will include features and bugfixes suggested, reported and/or contributed by the community. For example:
- Differentiating between
Net::Route-as-a-class andNet::Route-as-a-module - Support for more operating systems
- Getting rid of CPAN dependencies that are troublesome to install on some platforms.
- Your idea (<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Route>) here...
The API might change somewhat, if necessary. π
1.0 - API Freeze
When appropriate (according to the user reports), we will freeze the interface and release version 1.0. βοΈβ¨
π BUGS π
Please report any bugs or feature requests to bug-net-route at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Route>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. we love a feedback loop π
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc Net::Route
You can also look for information at:
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Route>
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Net-Route>
- CPAN Ratings
<http://cpanratings.perl.org/d/Net-Route>
- Search CPAN
<http://search.cpan.org/dist/Net-Route>
π AUTHOR π
Created by Alexandre Storoz, <astoroz@straton-it.fr> π
Maintained by Thomas Equeter, <tequeter@straton-it.fr> π
π LICENSE AND COPYRIGHT π
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.
and that's the whole page, bestie β perl v5.36.0, dated 2023-06-15, brought to you under the Net::Route(3pm) manual π«Ά stay portable, stay slaying π
β¨
π¦ where this page comes from
- debian trixie: libnet-route-perl 0.02-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-route-perl 0.02-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-route-perl 0.02-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-route-perl 0.02-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms