all ready for 0.0.0

This commit is contained in:
Zane C. B-H 2019-07-06 22:57:27 -05:00
parent 53e6963655
commit c66c420479
4 changed files with 100 additions and 35 deletions

View File

@ -1,5 +1,6 @@
Revision history for Net-Connection
0.01 Date/time
First version, released on an unsuspecting world.
0.0,0 2019-07-06/23:00
-Initial release.

View File

@ -4,25 +4,24 @@ use warnings;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
NAME => 'Net::Connection',
AUTHOR => q{Zane C. Bowers-Hadley <vvelox@vvelox.net>},
VERSION_FROM => 'lib/Net/Connection.pm',
ABSTRACT_FROM => 'lib/Net/Connection.pm',
LICENSE => 'artistic_2',
MIN_PERL_VERSION => '5.006',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '0',
},
TEST_REQUIRES => {
'Test::More' => '0',
},
PREREQ_PM => {
#'ABC' => '1.6',
#'Foo::Bar::Module' => '5.0401',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Net-Connection-*' },
);
NAME => 'Net::Connection',
AUTHOR => q{Zane C. Bowers-Hadley <vvelox@vvelox.net>},
VERSION_FROM => 'lib/Net/Connection.pm',
ABSTRACT_FROM => 'lib/Net/Connection.pm',
LICENSE => 'artistic_2',
MIN_PERL_VERSION => '5.006',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '0',
},
TEST_REQUIRES => {
'Test::More' => '0',
},
PREREQ_PM => {
'Net::DNS' => '1.20',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Net-Connection-*' },
);
# Compatibility with old versions of ExtUtils::MakeMaker
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
@ -36,10 +35,10 @@ unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
delete $WriteMakefileArgs{MIN_PERL_VERSION}
unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
delete $WriteMakefileArgs{LICENSE}
unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };
unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };
WriteMakefile(%WriteMakefileArgs);

View File

@ -1,16 +1,40 @@
Net-Connection
The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.
This module crates a object that basically serves as a means to store basic
connection information and retrieve it.
A README file is required for CPAN modules since CPAN extracts the README
file from a module distribution so that people browsing the archive
can use it to get an idea of the module's uses. It is usually a good idea
to provide version information here so that people can decide whether
fixes for the module are worth downloading.
use Net::Connection;
#create a hash ref with the desired values
my $args={
'foreign_host' => '1.2.3.4',
'local_host' => '4.3.2.1',
'foreign_port' => '22',
'local_port' => '11132',
'sendq' => '1',
'recvq' => '0',
'pid' => '34342',
'uid' => '1000',
'state' => 'ESTABLISHED',
'proto' => 'tcp4'
};
# create the new object using the hash ref
my $conn=Net::Connection->new( $args );
# the same thing, but this time resolve the UID to a username
$args->{'uid_resolve'}='1';
$conn=Net::Connection->new( $args );
# now with PTR lookup
$args->{'ptrs'}='1';
$conn=Net::Connection->new( $args );
# prints a bit of the connection information...
print "L Host:".$conn->local_host."\n".
"L Port:".$conn->local_host."\n".
"F Host:".$conn->foreign_host."\n".
"F Port:".$conn->foreign_host."\n";
INSTALLATION
@ -42,6 +66,9 @@ You can also look for information at:
Search CPAN
https://metacpan.org/release/Net-Connection
Repository
http://gitea.eesdp.org/vvelox/Net-Connection
LICENSE AND COPYRIGHT

View File

@ -20,13 +20,47 @@ our $VERSION = '0.0.0';
=head1 SYNOPSIS
use Net::Connection;
#create a hash ref with the desired values
my $args={
'foreign_host' => '1.2.3.4',
'local_host' => '4.3.2.1',
'foreign_port' => '22',
'local_port' => '11132',
'sendq' => '1',
'recvq' => '0',
'pid' => '34342',
'uid' => '1000',
'state' => 'ESTABLISHED',
'proto' => 'tcp4'
};
# create the new object using the hash ref
my $conn=Net::Connection->new( $args );
# the same thing, but this time resolve the UID to a username
$args->{'uid_resolve'}='1';
$conn=Net::Connection->new( $args );
# now with PTR lookup
$args->{'ptrs'}='1';
$conn=Net::Connection->new( $args );
# prints a bit of the connection information...
print "L Host:".$conn->local_host."\n".
"L Port:".$conn->local_host."\n".
"F Host:".$conn->foreign_host."\n".
"F Port:".$conn->foreign_host."\n";
=head1 Methods
=head2 new
This initiates a new connection object.
One argument is taken is taken
One argument is taken is taken and it is a hash reference.
The minimum number of arguements is as below.
local_host
local_port
@ -115,7 +149,7 @@ different forms of TCP, TCP4, tcp4, tcpv4, and the like.
=head4 ptrs
If is true, then
If is true, then attempt to look up the PTRs for the hosts.
=head4 recvq
@ -604,6 +638,10 @@ L<https://cpanratings.perl.org/d/Net-Connection>
L<https://metacpan.org/release/Net-Connection>
=item * Repository
L<http://gitea.eesdp.org/vvelox/Net-Connection>
=back