diff options
author | ivan <ivan> | 2001-09-19 18:13:21 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-09-19 18:13:21 +0000 |
commit | cbc06e7ddd0206b1406c7fc06bd0dcec52b4a06f (patch) | |
tree | 1dd4f24cc1661179ff874afcacc0e7bd37552261 | |
parent | 2713464ca57841ec46d78e947754a15b060c5719 (diff) |
debugging
-rw-r--r-- | SSH.pm | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,7 +1,7 @@ package Net::SSH; use strict; -use vars qw($VERSION @ISA @EXPORT_OK $ssh); +use vars qw($VERSION @ISA @EXPORT_OK $ssh $DEBUG); use Exporter; use IPC::Open2; use IPC::Open3; @@ -10,6 +10,8 @@ use IPC::Open3; @EXPORT_OK = qw( ssh issh sshopen2 sshopen3 ); $VERSION = '0.02'; +$DEBUG = 0; + $ssh = "ssh"; =head1 NAME @@ -45,6 +47,8 @@ Calls ssh in batch mode. sub ssh { my($host, @command) = @_; my @cmd = ($ssh, '-o', 'BatchMode yes', $host, @command); + warn "[Net::SSH::ssh] executing ". join(' ', @cmd). "\n" + if $DEBUG; system(@cmd); } |