Fix perltidy tests

This commit is contained in:
Duncan Ferguson 2015-09-21 21:06:30 +01:00 committed by Duncan Ferguson
parent e83887c9b7
commit 5fad534ef0
2 changed files with 78 additions and 75 deletions

View file

@ -2,11 +2,29 @@
use ExtUtils::MakeMaker;
WriteMakefile
(
'PL_FILES' => {
'bin_PL/_build_docs' => []
'NAME' => 'App::ClusterSSH',
'VERSION_FROM' => 'lib/App/ClusterSSH.pm',
'PREREQ_PM' => {
'CPAN::Changes' => '0.27',
'Exception::Class' => '1.31',
'File::Slurp' => 0,
'File::Temp' => 0,
'File::Which' => 0,
'Getopt::Long' => 0,
'Locale::Maketext' => 0,
'Readonly' => 0,
'Test::Differences' => 0,
'Test::DistManifest' => 0,
'Test::PerlTidy' => 0,
'Test::Pod' => 0,
'Test::Pod::Coverage' => 0,
'Test::Trap' => 0,
'Tk' => '800.022',
'Try::Tiny' => 0,
'X11::Protocol' => '0.56',
'version' => '0'
},
'INSTALLDIRS' => 'site',
'NAME' => 'App::ClusterSSH',
'EXE_FILES' => [
'bin/ccon',
'bin/clusterssh_bash_completion.dist',
@ -14,26 +32,8 @@ WriteMakefile
'bin/cssh',
'bin/ctel'
],
'VERSION_FROM' => 'lib/App/ClusterSSH.pm',
'PREREQ_PM' => {
'Test::Trap' => 0,
'File::Which' => 0,
'Test::Pod' => 0,
'X11::Protocol' => '0.56',
'CPAN::Changes' => '0.27',
'Tk' => '800.022',
'File::Slurp' => 0,
'Try::Tiny' => 0,
'Getopt::Long' => 0,
'Test::Pod::Coverage' => 0,
'version' => '0',
'Readonly' => 0,
'Exception::Class' => '1.31',
'Test::Differences' => 0,
'Test::DistManifest' => 0,
'File::Temp' => 0,
'Test::PerlTidy' => 0,
'Locale::Maketext' => 0
'PL_FILES' => {
'bin_PL/_build_docs' => []
}
)
;

View file

@ -111,7 +111,7 @@ my $sysconfigdir = "/etc";
my %ssh_hostnames;
my $host_menu_static_items; # number of items in the host menu that should
# not be touched by build_host_menu
my(@dead_hosts); # list of hosts whose sessions are now closed
my (@dead_hosts); # list of hosts whose sessions are now closed
my $sort = sub { sort @_ }; # reference to our sort function which may later
# be changed in run() if the user has asked for
# natural sorting
@ -1243,13 +1243,16 @@ sub re_add_closed_sessions() {
my ($self) = @_;
$self->debug( 2, "add closed sessions" );
return if (scalar(@dead_hosts) == 0);
return if ( scalar(@dead_hosts) == 0 );
my @new_hosts = @dead_hosts;
# clear out the list in case open fails
@dead_hosts = qw//;
# try to open
$self->open_client_windows(@new_hosts);
# update hosts list with current state
$self->build_hosts_menu();
@ -1323,7 +1326,7 @@ sub setup_repeat() {
if ( defined( $servers{$svr}{pid} ) ) {
if ( !kill( 0, $servers{$svr}{pid} ) ) {
$build_menu = 1;
push(@dead_hosts, $servers{$svr}{givenname});
push( @dead_hosts, $servers{$svr}{givenname} );
delete( $servers{$svr} );
$self->debug( 0, "$svr session closed" );
}
@ -1799,7 +1802,7 @@ sub create_menubar() {
-menuitems => $host_menu_items
);
$host_menu_static_items = scalar(@{$host_menu_items});
$host_menu_static_items = scalar( @{$host_menu_items} );
$menus{send} = $menus{bar}->cascade(
-label => 'Send',
@ -1994,18 +1997,18 @@ sub run {
# if the user has asked for natural sorting we need to include an extra
# module
if ($self->config()->{'use_natural_sort'}) {
eval {
Module::Load::load('Sort::Naturally');
};
if ( $self->config()->{'use_natural_sort'} ) {
eval { Module::Load::load('Sort::Naturally'); };
if ($@) {
warn("natural sorting requested but unable to load Sort::Naturally: $@\n");
} else {
$sort = sub { Sort::Naturally::nsort( @_ ) };
warn(
"natural sorting requested but unable to load Sort::Naturally: $@\n"
);
}
else {
$sort = sub { Sort::Naturally::nsort(@_) };
}
}
$self->config->dump() if ( $self->options->dump_config );
$self->evaluate_commands() if ( $self->options->evaluate );