revert to lsof

This commit is contained in:
Zane C. B-H 2021-02-19 06:21:16 -06:00
parent 357d7e4dbe
commit adc7220396
2 changed files with 16 additions and 16 deletions

View File

@ -30,12 +30,12 @@ my %WriteMakefileArgs = (
clean => { FILES => 'Net-Connection-ncnetstat-*' },
);
if ( $^O =~ /freebsd/ ) {
$WriteMakefileArgs{PREREQ_PM}{'Net::Connection::FreeBSD_sockstat'} = '0.0.1';
}
else {
$WriteMakefileArgs{PREREQ_PM}{'Net::Connection::lsof'} = '0.1.1';
}
#if ( $^O =~ /freebsd/ ) {
# $WriteMakefileArgs{PREREQ_PM}{'Net::Connection::FreeBSD_sockstat'} = '0.0.1';
#}
#else {
$WriteMakefileArgs{PREREQ_PM}{'Net::Connection::lsof'} = '0.2.0';
#}
# Compatibility with old versions of ExtUtils::MakeMaker
unless ( eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 } ) {

View File

@ -11,9 +11,9 @@ use Proc::ProcessTable;
use Text::ANSITable;
# use Net::Connection::FreeBSD_sockstat if possible
use if $^O eq 'freebsd', 'Net::Connection::FreeBSD_sockstat';
use if $^O ne 'freebsd', 'Net::Connection::lsof';
#use if $^O eq 'freebsd', 'Net::Connection::FreeBSD_sockstat';
#use if $^O ne 'freebsd', 'Net::Connection::lsof';
use Net::Connection::lsof;
=head1 NAME
@ -21,11 +21,11 @@ Net::Connection::ncnetstat - The backend for ncnetstat, the colorized and enhanc
=head1 VERSION
Version 0.6.4
Version 0.7.0
=cut
our $VERSION = '0.6.4';
our $VERSION = '0.7.0';
=head1 SYNOPSIS
@ -173,12 +173,12 @@ sub run {
my $self = $_[0];
my @objects;
if ( $^O !~ /freebsd/ ) {
# if ( $^O !~ /freebsd/ ) {
@objects = &lsof_to_nc_objects;
}
else {
@objects = &sockstat_to_nc_objects;
}
# }
# else {
# @objects = &sockstat_to_nc_objects;
# }
my @found;
if ( defined( $self->{match} ) ) {