Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Net::Connection::Sort:UserrContributed Perl DocuNet::Connection::Sort::user(3)

NAME
       Net::Connection::Sort::user - Sorts the connections via the username

VERSION
       Version 0.0.0

SYNOPSIS
       Please keep in mind that	username is not	a requirement and if not
       specified is set	to 0, meaning it will show up earlier.

	   use Net::Connection::Sort::user;
	   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',
					       'uid' =>	22,
					       'pid' =>	2,
					       'username' => 'toor',
					       'uid_resolve' =>	0,
					       }),
			 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',
					       'uid' =>	1000,
					       'pid' =>	0,
					       'username' => 'root',
					       'uid_resolve' =>	0,
					       }),
			 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',
					       'uid' =>	1,
					       'pid' =>	44,
					       'username' => 'foo',
					       'uid_resolve' =>	0,
					       }),
	   # as	no username is specified, the value of 0 will just be used instead
			 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::user->new;

	   @objects=$sorter->sorter( \@objects );

	   print Dumper( \@objects );

METHODS
   new
       This initiates the module.

       No arguments are	taken and this will always succeed.

	   my $sorter=$sorter=Net::Connection::Sort::uid->new;

   sort
       This 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 );

   helper
       This is a internal function.

       If no UID is defined, returns 0.

AUTHOR
       Zane C. Bowers-Hadley, "<vvelox at vvelox.net>"

BUGS
       Please 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.

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc Net::Connection::Sort

       You can also look for information at:

       o   RT: CPAN's request tracker (report bugs here)

	   <https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Connection-Sort>

       o   AnnoCPAN: Annotated CPAN documentation

	   <http://annocpan.org/dist/Net-Connection-Sort>

       o   CPAN	Ratings

	   <https://cpanratings.perl.org/d/Net-Connection-Sort>

       o   Search CPAN

	   <https://metacpan.org/release/Net-Connection-Sort>

       o   Git Repo

	   <https://gitea.eesdp.org/vvelox/Net-Connection-Sort>

ACKNOWLEDGEMENTS
LICENSE	AND COPYRIGHT
       This software is	Copyright (c) 2019 by Zane C. Bowers-Hadley.

       This is free software, licensed under:

	 The Artistic License 2.0 (GPL Compatible)

perl v5.32.1			  2019-07-24	Net::Connection::Sort::user(3)

NAME | VERSION | SYNOPSIS | METHODS | AUTHOR | BUGS | SUPPORT | ACKNOWLEDGEMENTS | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Net::Connection::Sort::user&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help