Match/All.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Match/States.pm ↑ Summary
1 package Net::Connection::Match::All;
2  
3 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 Net::Connection::Match::All - Matches everything.
10  
11 =head1 VERSION
12  
13 Version 0.0.0
14  
15 =cut
16  
17 2 our $VERSION = '0.0.0';
18  
19 =head1 SYNOPSIS
20  
21 use Net::Connection::Match::All;
22 use Net::Connection;
23
24 my $connection_args={
25 foreign_host=>'10.0.0.1',
26 foreign_port=>'22',
27 local_host=>'10.0.0.2',
28 local_port=>'12322',
29 proto=>'tcp4',
30 state=>'ESTABLISHED',
31 pid=>0,
32 };
33
34 my $conn=Net::Connection->new( $connection_args );
35
36 my $checker=Net::Connection::Match::All->new;
37
38 if ( $checker->match( $conn ) ){
39 print "It matches.\n";
40 }
41  
42 =head1 METHODS
43  
44 =head2 new
45  
46 None taken.
47
48 my $checker=Net::Connection::Match::All->new( );
49  
50 =cut
51  
52 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
53 2 my $self = {};
54 2 bless $self;
55  
56 2 return $self;
57 }
58  
59 =head2 match
60  
61 Returns 1.
62  
63 if ( $checker->match( $conn ) ){
64 print "The connection matches.\n";
65 }
66  
67 =cut
68  
69 3 ▶sub match {
Subroutine match: called CC=1 SCAR=0.0
Pod documented
70 3 return 1;
71 }
72  
73 =head1 AUTHOR
74  
75 Zane C. Bowers-Hadley, C<< <vvelox at vvelox.net> >>
76  
77 =head1 BUGS
78  
79 Please report any bugs or feature requests to C<bug-net-connection-match at rt.cpan.org>, or through
80 the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Connection-Match>. I will be notified, and then you'll
81 automatically be notified of progress on your bug as I make changes.
82  
83  
84  
85  
86 =head1 SUPPORT
87  
88 You can find documentation for this module with the perldoc command.
89  
90 perldoc Net::Connection::Match
91  
92  
93 You can also look for information at:
94  
95 =over 4
96  
97 =item * RT: CPAN's request tracker (report bugs here)
98  
99 L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Connection-Match>
100  
101 =item * AnnoCPAN: Annotated CPAN documentation
102  
103 L<http://annocpan.org/dist/Net-Connection-Match>
104  
105 =item * CPAN Ratings
106  
107 L<https://cpanratings.perl.org/d/Net-Connection-Match>
108  
109 =item * Search CPAN
110  
111 L<https://metacpan.org/release/Net-Connection-Match>
112  
113 =back
114  
115  
116 =head1 ACKNOWLEDGEMENTS
117  
118  
119 =head1 LICENSE AND COPYRIGHT
120  
121 Copyright 2019 Zane C. Bowers-Hadley.
122  
123 This program is free software; you can redistribute it and/or modify it
124 under the terms of the the Artistic License (2.0). You may obtain a
125 copy of the full license at:
126  
127 L<http://www.perlfoundation.org/artistic_license_2_0>
128  
129 Any use, modification, and distribution of the Standard or Modified
130 Versions is governed by this Artistic License. By using, modifying or
131 distributing the Package, you accept this license. Do not use, modify,
132 or distribute the Package, if you do not accept this license.
133  
134 If your Modified Version has been derived from a Modified Version made
135 by someone other than you, you are nevertheless required to ensure that
136 your Modified Version complies with the requirements of this license.
137  
138 This license does not grant you the right to use any trademark, service
139 mark, tradename, or logo of the Copyright Holder.
140  
141 This license includes the non-exclusive, worldwide, free-of-charge
142 patent license to make, have made, use, offer to sell, sell, import and
143 otherwise transfer the Package with respect to any patent claims
144 licensable by the Copyright Holder that are necessarily infringed by the
145 Package. If you institute patent litigation (including a cross-claim or
146 counterclaim) against any party alleging that the Package constitutes
147 direct or contributory patent infringement, then this Artistic License
148 to you shall terminate on the date that such litigation is filed.
149  
150 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
151 AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
152 THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
153 PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
154 YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
155 CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
156 CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
157 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
158  
159  
160 =cut
161  
162 2 1; # End of Net::Connection::Match
« Match/States.pm ↑ Summary