all good now and ready for release
This commit is contained in:
parent
beb7b1ac96
commit
c0a63b2b6e
|
@ -21,6 +21,7 @@ WriteMakefile(
|
|||
'Error::Helper'=>'1.0.0',
|
||||
'Parse::Netstat'=>'0.14',
|
||||
'Parse::Netstat::Search'=>'0.0.0',
|
||||
'Net::IP'=>'1.26',
|
||||
},
|
||||
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
|
||||
clean => { FILES => 'Parse-Netstat-Search-Sort-*' },
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
Parse-Netstat-Search-Sort
|
||||
|
||||
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.
|
||||
Provides various methods of sorting the array returned by
|
||||
Parse::Netsat::Search.
|
||||
|
||||
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 Parse::Netstat::Search;
|
||||
use Parse::Netstat::Search::Sort;
|
||||
use Parse::Netstat qw(parse_netstat);
|
||||
|
||||
my $res = parse_netstat(output => join("", `netstat -n`), tcp=>1, udp=>1, unix=>0, flavor=>$^O);
|
||||
|
||||
my $pn-search=Parse::Netstat::Search->new;
|
||||
|
||||
my @found=$pn-search->search( $res );
|
||||
|
||||
my $sorter = Parse::Netstat::Search::Sort->new;
|
||||
|
||||
@found = $sorter->sort( \@found );
|
||||
|
||||
|
||||
INSTALLATION
|
||||
|
@ -42,6 +48,9 @@ You can also look for information at:
|
|||
Search CPAN
|
||||
https://metacpan.org/release/Parse-Netstat-Search-Sort
|
||||
|
||||
Code Repo
|
||||
https://gitea.eesdp.org/vvelox/Parse-Netstat-Search-Sort
|
||||
|
||||
|
||||
LICENSE AND COPYRIGHT
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@ our $VERSION = '0.0.0';
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Quick summary of what the module does.
|
||||
|
||||
Perhaps a little code snippet.
|
||||
|
||||
use Parse::Netstat::Search;
|
||||
use Parse::Netstat::Search::Sort;
|
||||
use Parse::Netstat qw(parse_netstat);
|
||||
|
@ -335,6 +331,10 @@ L<https://cpanratings.perl.org/d/Parse-Netstat-Search-Sort>
|
|||
|
||||
L<https://metacpan.org/release/Parse-Netstat-Search-Sort>
|
||||
|
||||
=item * Code Rep
|
||||
|
||||
L<https://gitea.eesdp.org/vvelox/Parse-Netstat-Search-Sort>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
|
|
@ -52,8 +52,6 @@ my @found=(
|
|||
|
||||
my $sorter=Parse::Netstat::Search::Sort->new;
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
my @sorted=$sorter->sort( \@found );
|
||||
|
||||
ok( $sorted[0]->{foreign_host} eq '1.1.1.1', 'host_f, 1') or diag('"'.$sorted[0]->{foreign_host}.'" returned for $sorted[0]->{foreign_host} instead of "1.1.1.1"');
|
||||
|
|
Loading…
Reference in New Issue