throws_ok { my $wsr = WebServerRemote->new(ssh => 'me@10.0.300.99') } qr {could not connect}, 'complains if unable to connect'; #### my $ssh = Net::OpenSSH->new($host, %opts); $ssh->error and croak "could not connect to host: $ssh->error"; #### ssh: Could not resolve hostname 10.0.300.99: nodename nor servname provided, or not known