diff --git a/lib/App/ClusterSSH/Host.pm b/lib/App/ClusterSSH/Host.pm index e3af6bf..199ffd3 100644 --- a/lib/App/ClusterSSH/Host.pm +++ b/lib/App/ClusterSSH/Host.pm @@ -37,7 +37,7 @@ sub new { # load in ssh hostname for later use if ( !%ssh_hostname_for || !$ssh_configs_read{ $self->{ssh_config} } ) { - $self->read_ssh_file( $self, $self->{ssh_config} ); + $self->read_ssh_file( $self->{ssh_config} ); $self->debug( 5, 'Have the following ssh hostnames' ); $self->debug( 5, ' "', $_, '"' ) diff --git a/t/10host.t b/t/10host.t index 8dc833f..2911dd0 100644 --- a/t/10host.t +++ b/t/10host.t @@ -752,6 +752,7 @@ trap { }; is( $trap->leaveby, 'return', 'returned ok' ); is( $trap->die, undef, 'returned ok' ); +is ($trap->stdout, '', 'No unexpected STDOUT' ); isa_ok( $host, "App::ClusterSSH::Host" ); is( $host, 'ssh_test', 'stringify works' ); is( $host->check_ssh_hostname, 0, 'check_ssh_hostname ok for ssh_test', ); @@ -764,6 +765,7 @@ trap { }; is( $trap->leaveby, 'return', 'returned ok' ); is( $trap->die, undef, 'returned ok' ); +is ($trap->stdout, '', 'No unexpected STDOUT' ); isa_ok( $host, "App::ClusterSSH::Host" ); is( $host, 'ssh_test', 'stringify works' ); is( $host->check_ssh_hostname, 0, 'check_ssh_hostname ok for ssh_test', ); @@ -788,6 +790,7 @@ for my $hostname ( }; is( $trap->leaveby, 'return', 'returned ok' ); is( $trap->die, undef, 'returned ok' ); + is ($trap->stdout, '', 'No unexpected STDOUT' ); isa_ok( $host, "App::ClusterSSH::Host" ); is( $host, $hostname, 'stringify works' ); is( $host->check_ssh_hostname, 1,