mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-02 01:21:14 +00:00
Improve test coverage
This commit is contained in:
parent
5615bbc5b1
commit
c807b52129
3 changed files with 113 additions and 5 deletions
|
@ -22,7 +22,6 @@ use POSIX qw/:sys_wait_h strftime mkfifo/;
|
|||
use File::Temp qw/:POSIX/;
|
||||
use Fcntl;
|
||||
use File::Basename;
|
||||
use Module::Load;
|
||||
use Net::hostent;
|
||||
use Sys::Hostname;
|
||||
use English;
|
||||
|
|
|
@ -5,6 +5,8 @@ use strict;
|
|||
use Carp;
|
||||
use App::ClusterSSH::L10N;
|
||||
|
||||
use Module::Load;
|
||||
|
||||
use Exception::Class (
|
||||
'App::ClusterSSH::Exception',
|
||||
'App::ClusterSSH::Exception::Config' => {
|
||||
|
@ -154,7 +156,7 @@ sub options {
|
|||
my ($self) = @_;
|
||||
return $self->{parent}->{options}
|
||||
if $self->{parent} && $self->{parent}->{options};
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub set_config {
|
||||
|
@ -283,11 +285,13 @@ sub parent {
|
|||
}
|
||||
|
||||
sub sort {
|
||||
my ($self) = @_;
|
||||
my $self = shift;
|
||||
|
||||
my $sort = sub { sort @_ };
|
||||
|
||||
return $sort unless defined $self->config()->{'use_natural_sort'};
|
||||
return $sort
|
||||
unless ref( $self->config() ) eq "HASH"
|
||||
&& $self->config()->{'use_natural_sort'};
|
||||
|
||||
# if the user has asked for natural sorting we need to include an extra
|
||||
# module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue