mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 09:53:23 +00:00
Fix test error
Fix test error on 5.8.8 (reported by Wei Wang) Also add to TODO file
This commit is contained in:
parent
98b93d91f4
commit
e2cc9a0863
5 changed files with 13 additions and 6 deletions
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use version;
|
||||
our $VERSION = version->new('0.02');
|
||||
our $VERSION = version->new('0.03');
|
||||
|
||||
use Carp;
|
||||
|
||||
|
@ -31,9 +31,9 @@ sub new {
|
|||
if ( !%ssh_hostname_for || !$ssh_configs_read{ $self->{ssh_config} } ) {
|
||||
$ssh_configs_read{ $self->{ssh_config} } = 1;
|
||||
if ( open( my $ssh_config_fh, '<', $self->{ssh_config} ) ) {
|
||||
while ( my $_ = <$ssh_config_fh> ) {
|
||||
chomp $_;
|
||||
next unless (m/^\s*host\s+(.*)/i);
|
||||
while ( my $line = <$ssh_config_fh> ) {
|
||||
chomp $line;
|
||||
next unless ($line =~ m/^\s*host\s+(.*)/i);
|
||||
|
||||
# account for multiple declarations of hosts
|
||||
$ssh_hostname_for{$_} = 1 foreach ( split( /\s+/, $1 ) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue