Browse Source

add git links and update README/changes for release

tags/0.0.0
Zane C. B-H 1 month ago
parent
commit
477905f567

+ 2
- 3
Net-Connection-Match/Changes View File

@@ -1,5 +1,4 @@
1 1
 Revision history for Net-Connection-Match
2 2
 
3
-0.01    Date/time
4
-        First version, released on an unsuspecting world.
5
-
3
+0.0.0	 2019-07-17/05:15
4
+		 - Initial release.

+ 64
- 11
Net-Connection-Match/README View File

@@ -1,16 +1,66 @@
1 1
 Net-Connection-Match
2 2
 
3
-The README is used to introduce the module and provide instructions on
4
-how to install the module, any machine dependencies it may have (for
5
-example C compilers and installed libraries) and any other information
6
-that should be provided before the module is installed.
7
-
8
-A README file is required for CPAN modules since CPAN extracts the README
9
-file from a module distribution so that people browsing the archive
10
-can use it to get an idea of the module's uses. It is usually a good idea
11
-to provide version information here so that people can decide whether
12
-fixes for the module are worth downloading.
13
-
3
+Provides a easy to use method for checking if a Net::Connection
4
+object mathes a series of checks.
5
+
6
+Currently can do matching based off of the following.
7
+
8
+ * CIDR
9
+ * Ports
10
+ * Protocol
11
+ * State
12
+ * PTR
13
+
14
+    use Net::Connection::Match;
15
+    use Net::Connection;
16
+    
17
+    my $connection_args={
18
+                         foreign_host=>'10.0.0.1',
19
+                         foreign_port=>'22',
20
+                         local_host=>'10.0.0.2',
21
+                         local_port=>'12322',
22
+                         proto=>'tcp4',
23
+                         state=>'LISTEN',
24
+                        };
25
+    my $conn=Net::Connection->new( $connection_args );
26
+    
27
+    my %args=(
28
+              checks=>[
29
+                       {
30
+                        type=>'Ports',
31
+                        invert=>0,
32
+                        args=>{
33
+                               ports=>[
34
+                                       '22',
35
+                                      ],
36
+                               lports=>[
37
+                                        '53',
38
+                                       ],
39
+                               fports=>[
40
+                                        '12345',
41
+                                       ],
42
+                        }
43
+                       },
44
+                       {
45
+                        type=>'Protos',
46
+                        invert=>0,
47
+                        args=>{
48
+                               protos=>[
49
+                                        'tcp4',
50
+                                       ],
51
+                        }
52
+                       }
53
+                      ]
54
+             );
55
+    
56
+    my $checker;
57
+    eval{
58
+        $checker=Net::Connection::Match->new( \%args );
59
+    } or die "New failed with...".$@;
60
+    
61
+    if ( $check->match( $conn ) ){
62
+        print "It matched!\n";
63
+    }
14 64
 
15 65
 INSTALLATION
16 66
 
@@ -42,6 +92,9 @@ You can also look for information at:
42 92
     Search CPAN
43 93
         https://metacpan.org/release/Net-Connection-Match
44 94
 
95
+    Git Repo
96
+        https://gitea.eesdp.org/vvelox/Net-Connection-Match
97
+
45 98
 
46 99
 LICENSE AND COPYRIGHT
47 100
 

+ 5
- 1
Net-Connection-Match/lib/Net/Connection/Match.pm View File

@@ -65,7 +65,7 @@ our $VERSION = '0.0.0';
65 65
     my $checker;
66 66
     eval{
67 67
         $checker=Net::Connection::Match->new( \%args );
68
-    };
68
+    } or die "New failed with...".$@;
69 69
     
70 70
     if ( $check->match( $conn ) ){
71 71
         print "It matched!\n";
@@ -335,6 +335,10 @@ L<https://cpanratings.perl.org/d/Net-Connection-Match>
335 335
 
336 336
 L<https://metacpan.org/release/Net-Connection-Match>
337 337
 
338
+=item * Git Repo
339
+
340
+L<https://gitea.eesdp.org/vvelox/Net-Connection-Match>
341
+
338 342
 =back
339 343
 
340 344
 

Loading…
Cancel
Save