Fix test error

Fix test error on 5.8.8 (reported by Wei Wang)
Also add to TODO file
This commit is contained in:
Duncan Ferguson 2010-09-09 12:17:43 +01:00
parent 98b93d91f4
commit e2cc9a0863
5 changed files with 13 additions and 6 deletions

View file

@ -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 ) );