Merge branch 'master' of github.com:duncs/clusterssh into getopt

This commit is contained in:
Duncan Ferguson 2014-05-17 17:32:23 +01:00
commit b54863993d
7 changed files with 27 additions and 10 deletions

View file

@ -1,5 +1,9 @@
4.02_04 0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net>
4.02_04 2014-05-17 Duncan Ferguson <duncan_ferguson@user.sf.net>
- Amend 'Changes' file format to match CPAN specs (see CPAN::Changes)
- Correct autoclose short option to what is actually used (Github issue 4) (thanks to Simon Fraser)
- Fix 'use_all_a_records' option (Github issue: 5) (thanks to Simon Fraser)
- Fix 'title' option (thanks to Barry Roberts)
- Fix 'Add host or cluster' window to contain cluster names
4.02_03 2014-01-31 Duncan Ferguson <duncan_ferguson@user.sf.net>
- Fix 'File->Show History' (Sf support request 41)

View file

@ -16,6 +16,7 @@
"prereqs" : {
"build" : {
"requires" : {
"CPAN::Changes" : "0.27",
"File::Temp" : "0",
"File::Which" : "0",
"Readonly" : "0",
@ -45,7 +46,7 @@
"provides" : {
"App::ClusterSSH" : {
"file" : "lib/App/ClusterSSH.pm",
"version" : "4.02_03"
"version" : "4.02_04"
},
"App::ClusterSSH::Base" : {
"file" : "lib/App/ClusterSSH/Base.pm",
@ -90,5 +91,5 @@
"http://github.com/duncs/clusterssh"
]
},
"version" : "4.02_03"
"version" : "4.02_04"
}

View file

@ -3,6 +3,7 @@ abstract: 'A container for functions of the ClusterSSH programs'
author:
- 'Duncan Ferguson <duncan_j_ferguson@yahoo.co.uk>'
build_requires:
CPAN::Changes: 0.27
File::Temp: 0
File::Which: 0
Readonly: 0
@ -23,7 +24,7 @@ name: App-ClusterSSH
provides:
App::ClusterSSH:
file: lib/App/ClusterSSH.pm
version: 4.02_03
version: 4.02_04
App::ClusterSSH::Base:
file: lib/App/ClusterSSH/Base.pm
version: 0.02
@ -59,4 +60,4 @@ resources:
x_Repository:
- http://clusterssh.git.sourceforge.net/
- http://github.com/duncs/clusterssh
version: 4.02_03
version: 4.02_04

View file

@ -5,6 +5,7 @@ WriteMakefile
'NAME' => 'App::ClusterSSH',
'VERSION_FROM' => 'lib/App/ClusterSSH.pm',
'PREREQ_PM' => {
'CPAN::Changes' => '0.27',
'Exception::Class' => '1.31',
'File::Temp' => 0,
'File::Which' => 0,

View file

@ -143,7 +143,7 @@ Run the command in each session, e.g. C<-a 'vi /etc/hosts'> to drop straight
into a vi session. NOTE: not all communications methods support this (ssh
and rsh should, telnet and console will not).
=item --autoclose,-A <seconds>
=item --autoclose,-K <seconds>
Number of seconds to wait before closing finished terminal windows.

View file

@ -3,7 +3,7 @@ package App::ClusterSSH;
use 5.008.004;
use warnings;
use strict;
use version; our $VERSION = version->new('4.02_03');
use version; our $VERSION = version->new('4.02_04');
use Carp;
@ -422,12 +422,14 @@ sub resolve_names(@) {
my $hostobj = gethostbyname($dirty);
if ( defined($hostobj) ) {
my @alladdrs = map { inet_ntoa($_) } @{ $hostobj->addr_list };
$self->cluster->register_tag( $dirty, @alladdrs );
if ( $#alladdrs > 0 ) {
$self->cluster->register_tag( $dirty, @alladdrs );
logmsg( 3, 'Expanded to ',
$self->cluster->get_tag($dirty) );
join(' ', $self->cluster->get_tag($dirty) ) );
@tag_list = $self->cluster->get_tag($dirty);
}
else {
# don't expand if there is only one record found
logmsg( 3, 'Only one A record' );
}
}
@ -1944,6 +1946,11 @@ sub run {
$self->config->load_configs( $options{'config-file'} );
if ( $options{title} ) {
$self->config->{title} = $options{title};
logmsg( 2, "Title: " . $self->config->{title} );
}
if ( $options{use_all_a_records} ) {
$self->config->{use_all_a_records}
= !$self->config->{use_all_a_records} || 0;

View file

@ -173,7 +173,10 @@ sub get_tag {
sub list_tags {
my ($self) = @_;
return sort keys( %{ $self->{tags} } );
return
wantarray
? sort keys( %{ $self->{tags} } )
: scalar keys( %{ $self->{tags} } );
}
sub dump_tags {