add git links and update README/changes for release
This commit is contained in:
parent
8f72345480
commit
477905f567
|
@ -1,5 +1,4 @@
|
||||||
Revision history for Net-Connection-Match
|
Revision history for Net-Connection-Match
|
||||||
|
|
||||||
0.01 Date/time
|
0.0.0 2019-07-17/05:15
|
||||||
First version, released on an unsuspecting world.
|
- Initial release.
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,66 @@
|
||||||
Net-Connection-Match
|
Net-Connection-Match
|
||||||
|
|
||||||
The README is used to introduce the module and provide instructions on
|
Provides a easy to use method for checking if a Net::Connection
|
||||||
how to install the module, any machine dependencies it may have (for
|
object mathes a series of checks.
|
||||||
example C compilers and installed libraries) and any other information
|
|
||||||
that should be provided before the module is installed.
|
|
||||||
|
|
||||||
A README file is required for CPAN modules since CPAN extracts the README
|
Currently can do matching based off of the following.
|
||||||
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.
|
|
||||||
|
|
||||||
|
* CIDR
|
||||||
|
* Ports
|
||||||
|
* Protocol
|
||||||
|
* State
|
||||||
|
* PTR
|
||||||
|
|
||||||
|
use Net::Connection::Match;
|
||||||
|
use Net::Connection;
|
||||||
|
|
||||||
|
my $connection_args={
|
||||||
|
foreign_host=>'10.0.0.1',
|
||||||
|
foreign_port=>'22',
|
||||||
|
local_host=>'10.0.0.2',
|
||||||
|
local_port=>'12322',
|
||||||
|
proto=>'tcp4',
|
||||||
|
state=>'LISTEN',
|
||||||
|
};
|
||||||
|
my $conn=Net::Connection->new( $connection_args );
|
||||||
|
|
||||||
|
my %args=(
|
||||||
|
checks=>[
|
||||||
|
{
|
||||||
|
type=>'Ports',
|
||||||
|
invert=>0,
|
||||||
|
args=>{
|
||||||
|
ports=>[
|
||||||
|
'22',
|
||||||
|
],
|
||||||
|
lports=>[
|
||||||
|
'53',
|
||||||
|
],
|
||||||
|
fports=>[
|
||||||
|
'12345',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type=>'Protos',
|
||||||
|
invert=>0,
|
||||||
|
args=>{
|
||||||
|
protos=>[
|
||||||
|
'tcp4',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
my $checker;
|
||||||
|
eval{
|
||||||
|
$checker=Net::Connection::Match->new( \%args );
|
||||||
|
} or die "New failed with...".$@;
|
||||||
|
|
||||||
|
if ( $check->match( $conn ) ){
|
||||||
|
print "It matched!\n";
|
||||||
|
}
|
||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
|
@ -42,6 +92,9 @@ You can also look for information at:
|
||||||
Search CPAN
|
Search CPAN
|
||||||
https://metacpan.org/release/Net-Connection-Match
|
https://metacpan.org/release/Net-Connection-Match
|
||||||
|
|
||||||
|
Git Repo
|
||||||
|
https://gitea.eesdp.org/vvelox/Net-Connection-Match
|
||||||
|
|
||||||
|
|
||||||
LICENSE AND COPYRIGHT
|
LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ our $VERSION = '0.0.0';
|
||||||
my $checker;
|
my $checker;
|
||||||
eval{
|
eval{
|
||||||
$checker=Net::Connection::Match->new( \%args );
|
$checker=Net::Connection::Match->new( \%args );
|
||||||
};
|
} or die "New failed with...".$@;
|
||||||
|
|
||||||
if ( $check->match( $conn ) ){
|
if ( $check->match( $conn ) ){
|
||||||
print "It matched!\n";
|
print "It matched!\n";
|
||||||
|
@ -335,6 +335,10 @@ L<https://cpanratings.perl.org/d/Net-Connection-Match>
|
||||||
|
|
||||||
L<https://metacpan.org/release/Net-Connection-Match>
|
L<https://metacpan.org/release/Net-Connection-Match>
|
||||||
|
|
||||||
|
=item * Git Repo
|
||||||
|
|
||||||
|
L<https://gitea.eesdp.org/vvelox/Net-Connection-Match>
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue