| 1 | package Parse::Netstat::Search::Sort; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 2 | ▶ | use base 'Error::Helper'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Net::IP; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | Parse::Netstat::Search::Sort - Sorts the returned array from Parse::Netstat::Search. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | Version 0.0.1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 2 | our $VERSION = '0.0.1'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | use Parse::Netstat::Search; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | use Parse::Netstat::Search::Sort; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | use Parse::Netstat qw(parse_netstat); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | my $res = parse_netstat(output => join("", `netstat -n`), tcp=>1, udp=>1, unix=>0, flavor=>$^O); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | my $pn-search=Parse::Netstat::Search->new; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | my @found=$pn-search->search( $res ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | my $sorter = Parse::Netstat::Search::Sort->new; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | @found = $sorter->sort( \@found ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | The supported sort methods are as below. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | host_f Host, Foreign (default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | host_l Host, Local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | port_f Port, Foriegn | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | port_l Port, Local | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | state State | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | protocol Protocol | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | q_r Queue, Receive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | q_s Queue, Send | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | none No sorting is done. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | These dual sort can take noticably longer than the ones above. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | host_ff Host, Foreign First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | host_lf Host, Local First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | port_ff Port, Foreign First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | port_lf Port, Local First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | q_rf Queue, Receive First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | q_sf Queue, Send First | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | =head1 Methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | =head2 new | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | Initiates the object. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | my $sorter=Parse::Netstat::Search->new; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 1 | ▶ | sub new{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 1 | my $self={ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | perror=>undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | error=>undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | errorString=>'', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | errorExtra=>{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 1 => 'badSort', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 2 => 'badArray', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | sort=>'host_f', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | invert=>undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | sort_check=>{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | host_ff=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | host_lf=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | host_f=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | host_l=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | port_ff=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | port_lf=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | port_f=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | port_l=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | state=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | protocol=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | q_rf=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | q_sf=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | q_r=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | q_s=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | none=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | bless $self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 1 | return $self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | =head2 get_sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | This returns the current sort method. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | my $sort=$pnc->get_sort; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 1 | ▶ | sub get_sort{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_sort: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 1 | my $self=$_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 1 | ▶ | if( ! $self->errorblank ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 1 | return $self->{sort}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | =head2 set_sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | This sets the sort method to be used and if it should | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | be inverted. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | The first argument is the sort method name and the second is a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | boolean on if it should be inverted or not. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | Leaving either undef resets the undef value back to the default. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | The supported sorting methods are as below. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | $ sorter->set_sort( $sort_method ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | if( $sorter->error ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | warn( '"'.$sort_method.'"' is not a valid sort method ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | # reset to defaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | $sorter->set_sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | # Set the sort method to host_f and invert. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | $sorter->set_sort( 'host_f' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 7 | ▶ | sub set_sort{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
set_sort: called CC=4 SCAR=17.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 7 | my $self=$_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 7 | my $sort=$_[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 7 | ▶ | if( ! $self->errorblank ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 7 | ▶ | if (!defined( $sort ) ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | $sort='host_f'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 7 | ▶ | if (! defined( $self->{sort_check}{$sort} ) ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | $self->{error}=1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | $self->{errorString}='"'.$sort.'" is not a valid sort type'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | $self->warn; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 7 | $self->{sort}=$sort; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 7 | return 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | =head2 sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | Sorts the provided array from Parse::Netstat::Search. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | my @sorted=$sorter->sort( \@found ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 8 | ▶ | sub sort{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sort: called CC=25 SCAR=45.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 8 | my $self=$_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 8 | my @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 8 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[1] and ref $_[1] eq "ARRAY"
MC/DC0%0/2
defined $_[1] and ref $_[1] eq "ARRAY"
defined $_[1]
ref $_[1] eq "ARRAY"
Truth table33%1/3
A and B
A= defined $_[1]B= ref $_[1] eq "ARRAY"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | defined( $_[1] ) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | ( ref($_[1]) eq 'ARRAY' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 8 | @found=@{ $_[1] }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | }else{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | $self->{error}=2; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | $self->{errorString}='The passed item is either not a array or undefined'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | $self->warn; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 8 | ▶ | if( ! $self->errorblank ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | # handle sorting if needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 8 | ▶ | if ( $self->{sort} ne 'none' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 8 | ▶ | if( $self->{sort} eq 'host_ff' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 14 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | &host_sort_helper( $a->{foreign_host} ) <=> &host_sort_helper( $b->{foreign_host} ) or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | &host_sort_helper( $a->{local_host} ) <=> &host_sort_helper( $b->{local_host} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'}) || &host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
MC/DC0%0/2
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'}) || &host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
Truth table0%0/3
A || B
A= &host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})B= &host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | }elsif( $self->{sort} eq 'host_lf' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | &host_sort_helper( $a->{local_host} ) <=> &host_sort_helper( $b->{local_host} ) or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | &host_sort_helper( $a->{foreign_host} ) <=> &host_sort_helper( $b->{foreign_host} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'}) || &host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
MC/DC0%0/2
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'}) || &host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
&host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
Truth table0%0/3
A || B
A= &host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})B= &host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | }elsif( $self->{sort} eq 'host_f' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 1 | &host_sort_helper( $a->{foreign_host} ) <=> &host_sort_helper( $b->{foreign_host} ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | }elsif( $self->{sort} eq 'host_l' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 1 | &host_sort_helper( $a->{local_host} ) <=> &host_sort_helper( $b->{local_host} ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | }elsif( $self->{sort} eq 'port_ff' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | &port_sort_helper( $a->{foreign_port} ) <=> &port_sort_helper( $b->{foreign_port} ) or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | &port_sort_helper( $a->{local_port} ) <=> &port_sort_helper( $b->{local_port} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'}) || &port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
MC/DC0%0/2
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'}) || &port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
Truth table0%0/3
A || B
A= &port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})B= &port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | }elsif( $self->{sort} eq 'port_lf' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | &port_sort_helper( $a->{local_port} ) <=> &port_sort_helper( $b->{local_port} ) or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | &port_sort_helper( $a->{foreign_port} ) <=> &port_sort_helper( $b->{foreign_port} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'}) || &port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
MC/DC0%0/2
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'}) || &port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
&port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
Truth table0%0/3
A || B
A= &port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})B= &port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | }elsif( $self->{sort} eq 'port_f' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | 1 | &port_sort_helper( $a->{foreign_port} ) <=> &port_sort_helper( $b->{foreign_port} ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | }elsif( $self->{sort} eq 'port_l' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 1 | &port_sort_helper( $a->{local_port} ) <=> &port_sort_helper( $b->{local_port} ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | }elsif( $self->{sort} eq 'state' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 1 | $a->{state} cmp $b->{state} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | }elsif( $self->{sort} eq 'protocol' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 1 | $a->{proto} cmp $b->{proto} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 4 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | }elsif( $self->{sort} eq 'q_rf' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | $a->{recvq} <=> $b->{recvq} or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | $a->{sendq} <=> $b->{sendq} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'} || $Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
MC/DC0%0/2
$Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'} || $Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
$Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
$Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
Truth table0%0/3
A || B
A= $Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}B= $Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | }elsif( $self->{sort} eq 'q_sf' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | $a->{sendq} <=> $b->{sendq} or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | $a->{recvq} <=> $b->{recvq} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | ▶ | } @found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'} || $Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
MC/DC0%0/2
$Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'} || $Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
$Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
$Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
Truth table0%0/3
A || B
A= $Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}B= $Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | }elsif( $self->{sort} eq 'q_r' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 1 | $a->{recvq} <=> $b->{recvq} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 4 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | }elsif( $self->{sort} eq 'q_s' ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | @found=sort { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 1 | $a->{sendq} <=> $b->{sendq} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 5 | } @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 8 | return @found; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | =head2 host_sort_helper | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | Internal function. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | Takes a host and converts it to a number. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 20 | ▶ | sub host_sort_helper{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
host_sort_helper: called CC=4 SCAR=16.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 20 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not defined $_[0] or $_[0] eq "*"
MC/DC0%0/2
not defined $_[0] or $_[0] eq "*"
not defined $_[0]
$_[0] eq "*"
Truth table33%1/3
not(A) or B
A= not defined $_[0]B= $_[0] eq "*"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | ( !defined($_[0]) ) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | ( $_[0] eq '*' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 20 | my $host=eval { Net::IP->new( $_[0] )->intip} ; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 20 | ▶ | if (!defined( $host )){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | 20 | return $host; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | =head2 port_sort_helper | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | Internal function. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | Makes sure a port number is always returned. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 20 | ▶ | sub port_sort_helper{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
port_sort_helper: called CC=3 SCAR=14.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | 20 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not defined $_[0] or $_[0] eq "*"
MC/DC0%0/2
not defined $_[0] or $_[0] eq "*"
not defined $_[0]
$_[0] eq "*"
Truth table33%1/3
not(A) or B
A= not defined $_[0]B= $_[0] eq "*"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | ( !defined($_[0]) ) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | ( $_[0] eq '*' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | ){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 20 | return $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | =head1 ERROR CODES / FLAGS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | Error handling is provided by L<Error::Helper>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | =head2 1 / badSort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | Invalid value specified for sort. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | =head2 2 / badArray | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | The passed item is not a array. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | Zame C. Bowers-Hadley, C<< <vvelox at vvelox.net> >> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | =head1 BUGS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | Please report any bugs or feature requests to C<bug-parse-netstat-search-sort at rt.cpan.org>, or through | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-Netstat-Search-Sort>. I will be notified, and then you'll | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | automatically be notified of progress on your bug as I make changes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | You can find documentation for this module with the perldoc command. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | perldoc Parse::Netstat::Search::Sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | You can also look for information at: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | =item * RT: CPAN's request tracker (report bugs here) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-Netstat-Search-Sort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | L<http://annocpan.org/dist/Parse-Netstat-Search-Sort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | =item * CPAN Ratings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | L<https://cpanratings.perl.org/d/Parse-Netstat-Search-Sort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | =item * Search CPAN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | L<https://metacpan.org/release/Parse-Netstat-Search-Sort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | =item * Code Rep | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | L<https://gitea.eesdp.org/vvelox/Parse-Netstat-Search-Sort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | =back | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | =head1 ACKNOWLEDGEMENTS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | =head1 LICENSE AND COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | Copyright 2019 Zame C. Bowers-Hadley. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | under the terms of the the Artistic License (2.0). You may obtain a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | copy of the full license at: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | L<http://www.perlfoundation.org/artistic_license_2_0> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | Any use, modification, and distribution of the Standard or Modified | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | Versions is governed by this Artistic License. By using, modifying or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | distributing the Package, you accept this license. Do not use, modify, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | or distribute the Package, if you do not accept this license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | If your Modified Version has been derived from a Modified Version made | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | by someone other than you, you are nevertheless required to ensure that | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | your Modified Version complies with the requirements of this license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | This license does not grant you the right to use any trademark, service | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | mark, tradename, or logo of the Copyright Holder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | This license includes the non-exclusive, worldwide, free-of-charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | patent license to make, have made, use, offer to sell, sell, import and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | otherwise transfer the Package with respect to any patent claims | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | licensable by the Copyright Holder that are necessarily infringed by the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | Package. If you institute patent litigation (including a cross-claim or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | counterclaim) against any party alleging that the Package constitutes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | direct or contributory patent infringement, then this Artistic License | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | to you shall terminate on the date that such litigation is filed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | 2 | 1; # End of Parse::Netstat::Search::Sort | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||