mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 18:03:23 +00:00
Fix perltidy tests
This commit is contained in:
parent
e83887c9b7
commit
5fad534ef0
2 changed files with 78 additions and 75 deletions
50
Makefile.PL
50
Makefile.PL
|
@ -2,11 +2,29 @@
|
||||||
use ExtUtils::MakeMaker;
|
use ExtUtils::MakeMaker;
|
||||||
WriteMakefile
|
WriteMakefile
|
||||||
(
|
(
|
||||||
'PL_FILES' => {
|
|
||||||
'bin_PL/_build_docs' => []
|
|
||||||
},
|
|
||||||
'INSTALLDIRS' => 'site',
|
|
||||||
'NAME' => 'App::ClusterSSH',
|
'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',
|
||||||
'EXE_FILES' => [
|
'EXE_FILES' => [
|
||||||
'bin/ccon',
|
'bin/ccon',
|
||||||
'bin/clusterssh_bash_completion.dist',
|
'bin/clusterssh_bash_completion.dist',
|
||||||
|
@ -14,26 +32,8 @@ WriteMakefile
|
||||||
'bin/cssh',
|
'bin/cssh',
|
||||||
'bin/ctel'
|
'bin/ctel'
|
||||||
],
|
],
|
||||||
'VERSION_FROM' => 'lib/App/ClusterSSH.pm',
|
'PL_FILES' => {
|
||||||
'PREREQ_PM' => {
|
'bin_PL/_build_docs' => []
|
||||||
'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
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
|
@ -109,12 +109,12 @@ my $xdisplay;
|
||||||
my %keyboardmap;
|
my %keyboardmap;
|
||||||
my $sysconfigdir = "/etc";
|
my $sysconfigdir = "/etc";
|
||||||
my %ssh_hostnames;
|
my %ssh_hostnames;
|
||||||
my $host_menu_static_items; # number of items in the host menu that should
|
my $host_menu_static_items; # number of items in the host menu that should
|
||||||
# not be touched by build_host_menu
|
# 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
|
my $sort = sub { sort @_ }; # reference to our sort function which may later
|
||||||
# be changed in run() if the user has asked for
|
# be changed in run() if the user has asked for
|
||||||
# natural sorting
|
# natural sorting
|
||||||
|
|
||||||
$keysymtocode{unknown_sym} = 0xFFFFFF; # put in a default "unknown" entry
|
$keysymtocode{unknown_sym} = 0xFFFFFF; # put in a default "unknown" entry
|
||||||
$keysymtocode{EuroSign}
|
$keysymtocode{EuroSign}
|
||||||
|
@ -1243,13 +1243,16 @@ sub re_add_closed_sessions() {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->debug( 2, "add closed sessions" );
|
$self->debug( 2, "add closed sessions" );
|
||||||
|
|
||||||
return if (scalar(@dead_hosts) == 0);
|
return if ( scalar(@dead_hosts) == 0 );
|
||||||
|
|
||||||
my @new_hosts = @dead_hosts;
|
my @new_hosts = @dead_hosts;
|
||||||
|
|
||||||
# clear out the list in case open fails
|
# clear out the list in case open fails
|
||||||
@dead_hosts = qw//;
|
@dead_hosts = qw//;
|
||||||
|
|
||||||
# try to open
|
# try to open
|
||||||
$self->open_client_windows(@new_hosts);
|
$self->open_client_windows(@new_hosts);
|
||||||
|
|
||||||
# update hosts list with current state
|
# update hosts list with current state
|
||||||
$self->build_hosts_menu();
|
$self->build_hosts_menu();
|
||||||
|
|
||||||
|
@ -1323,7 +1326,7 @@ sub setup_repeat() {
|
||||||
if ( defined( $servers{$svr}{pid} ) ) {
|
if ( defined( $servers{$svr}{pid} ) ) {
|
||||||
if ( !kill( 0, $servers{$svr}{pid} ) ) {
|
if ( !kill( 0, $servers{$svr}{pid} ) ) {
|
||||||
$build_menu = 1;
|
$build_menu = 1;
|
||||||
push(@dead_hosts, $servers{$svr}{givenname});
|
push( @dead_hosts, $servers{$svr}{givenname} );
|
||||||
delete( $servers{$svr} );
|
delete( $servers{$svr} );
|
||||||
$self->debug( 0, "$svr session closed" );
|
$self->debug( 0, "$svr session closed" );
|
||||||
}
|
}
|
||||||
|
@ -1757,41 +1760,41 @@ sub create_menubar() {
|
||||||
);
|
);
|
||||||
|
|
||||||
my $host_menu_items = [
|
my $host_menu_items = [
|
||||||
[ "command",
|
[ "command",
|
||||||
"Retile Windows",
|
"Retile Windows",
|
||||||
-command => sub { $self->retile_hosts },
|
-command => sub { $self->retile_hosts },
|
||||||
-accelerator => $self->config->{key_retilehosts},
|
-accelerator => $self->config->{key_retilehosts},
|
||||||
],
|
],
|
||||||
|
|
||||||
# [ "command", "Capture Terminal", -command => sub { $self->capture_terminal), ],
|
# [ "command", "Capture Terminal", -command => sub { $self->capture_terminal), ],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Set all active",
|
"Set all active",
|
||||||
-command => sub { $self->set_all_active() },
|
-command => sub { $self->set_all_active() },
|
||||||
],
|
],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Set half inactive",
|
"Set half inactive",
|
||||||
-command => sub { $self->set_half_inactive() },
|
-command => sub { $self->set_half_inactive() },
|
||||||
],
|
],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Toggle active state",
|
"Toggle active state",
|
||||||
-command => sub { $self->toggle_active_state() },
|
-command => sub { $self->toggle_active_state() },
|
||||||
],
|
],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Close inactive sessions",
|
"Close inactive sessions",
|
||||||
-command => sub { $self->close_inactive_sessions() },
|
-command => sub { $self->close_inactive_sessions() },
|
||||||
],
|
],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Add Host(s) or Cluster(s)",
|
"Add Host(s) or Cluster(s)",
|
||||||
-command => sub { $self->add_host_by_name, },
|
-command => sub { $self->add_host_by_name, },
|
||||||
-accelerator => $self->config->{key_addhost},
|
-accelerator => $self->config->{key_addhost},
|
||||||
],
|
],
|
||||||
[ "command",
|
[ "command",
|
||||||
"Re-add closed session(s)",
|
"Re-add closed session(s)",
|
||||||
-command => sub { $self->re_add_closed_sessions() },
|
-command => sub { $self->re_add_closed_sessions() },
|
||||||
],
|
],
|
||||||
'' # this is needed as build_host_menu always drops the
|
'' # this is needed as build_host_menu always drops the
|
||||||
# last item
|
# last item
|
||||||
];
|
];
|
||||||
|
|
||||||
$menus{hosts} = $menus{bar}->cascade(
|
$menus{hosts} = $menus{bar}->cascade(
|
||||||
-label => 'Hosts',
|
-label => 'Hosts',
|
||||||
|
@ -1799,7 +1802,7 @@ sub create_menubar() {
|
||||||
-menuitems => $host_menu_items
|
-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(
|
$menus{send} = $menus{bar}->cascade(
|
||||||
-label => 'Send',
|
-label => 'Send',
|
||||||
|
@ -1994,18 +1997,18 @@ sub run {
|
||||||
|
|
||||||
# if the user has asked for natural sorting we need to include an extra
|
# if the user has asked for natural sorting we need to include an extra
|
||||||
# module
|
# module
|
||||||
if ($self->config()->{'use_natural_sort'}) {
|
if ( $self->config()->{'use_natural_sort'} ) {
|
||||||
eval {
|
eval { Module::Load::load('Sort::Naturally'); };
|
||||||
Module::Load::load('Sort::Naturally');
|
|
||||||
};
|
|
||||||
if ($@) {
|
if ($@) {
|
||||||
warn("natural sorting requested but unable to load Sort::Naturally: $@\n");
|
warn(
|
||||||
} else {
|
"natural sorting requested but unable to load Sort::Naturally: $@\n"
|
||||||
$sort = sub { Sort::Naturally::nsort( @_ ) };
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$sort = sub { Sort::Naturally::nsort(@_) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$self->config->dump() if ( $self->options->dump_config );
|
$self->config->dump() if ( $self->options->dump_config );
|
||||||
|
|
||||||
$self->evaluate_commands() if ( $self->options->evaluate );
|
$self->evaluate_commands() if ( $self->options->evaluate );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue