|
NAMENet::Connection::Sort::ptr_f - Sorts via the foriegn PTR.VERSIONVersion 0.0.0SYNOPSISIf a foriegn PTR could not be found or is not set, then the foreign host is used.use Net::Connection::Sort::ptr_f; use Net::Connection; use Data::Dumper; my @objects=( Net::Connection->new({ 'foreign_host' => '3.3.3.3', 'local_host' => '4.4.4.4', 'foreign_port' => '22', 'local_port' => '11132', 'sendq' => '1', 'recvq' => '0', 'state' => 'ESTABLISHED', 'proto' => 'tcp4', 'ptrs' => 0, 'foreign_ptr' => 'c.foo', }), Net::Connection->new({ 'foreign_host' => '1.1.1.1', 'local_host' => '2.2.2.2', 'foreign_port' => '22', 'local_port' => '11132', 'sendq' => '1', 'recvq' => '0', 'state' => 'ESTABLISHED', 'proto' => 'tcp4', 'ptrs' => 0, 'foreign_ptr' => 'a.foo', }), Net::Connection->new({ 'foreign_host' => '5.5.5.5', 'local_host' => '6.6.6.6', 'foreign_port' => '22', 'local_port' => '11132', 'sendq' => '1', 'recvq' => '0', 'state' => 'ESTABLISHED', 'proto' => 'tcp4', 'ptrs' => 0, 'foreign_ptr' => 'b.foo', }), Net::Connection->new({ 'foreign_host' => '3.3.3.3', 'local_host' => '4.4.4.4', 'foreign_port' => '22', 'local_port' => '11132', 'sendq' => '1', 'recvq' => '0', 'state' => 'ESTABLISHED', 'proto' => 'tcp4' }), ); my $sorter=$sorter=Net::Connection::Sort::ptr_f->new; @objects=$sorter->sorter( \@objects ); print Dumper( \@objects ); METHODSnewThis initiates the module.No arguments are taken and this will always succeed. my $sorter=$sorter=Net::Connection::Sort::ptr_f->new; sortThis sorts the array of Net::Connection objects.One object is taken and that is a array of objects. @objects=$sorter->sorter( \@objects ); print Dumper( \@objects ); helperThis is a internal function.If the foreign PTR is not defined, the foreign host is returned. AUTHORZane C. Bowers-Hadley, "<vvelox at vvelox.net>"BUGSPlease report any bugs or feature requests to "bug-net-connection-sort at rt.cpan.org", or through the web interface at <https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Connection-Sort>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORTYou can find documentation for this module with the perldoc command.perldoc Net::Connection::Sort You can also look for information at:
ACKNOWLEDGEMENTSLICENSE AND COPYRIGHTThis software is Copyright (c) 2019 by Zane C. Bowers-Hadley.This is free software, licensed under: The Artistic License 2.0 (GPL Compatible)
Visit the GSP FreeBSD Man Page Interface. |