my @lines;
-sub _debug ($) {\r
+sub _debug ($) {
my ($msg) = @_;
-
+
my $logfile = "/tmp/rexex_debug.log";
-
- open my $file, '>>', $logfile or die "Unable to open $logfile for writing - $!";
-
+
+ open my $file, '>>', $logfile or croak "Unable to open $logfile for writing - $!";
+
print $file "DEBUG: $msg\n";
-
- close $file;\r
+
+ close $file;
+
+ return;
} # _debug
sub ssh {
if ($logged_in) {
# It's always hard to find the prompt. So let's make a distintive one
- $self->{prompt} = '@@@';
+ $self->{prompt} = "\n@@@";
$self->{handle} = $remote;
# OK this is real tricky. If we call execute with a command of PS1=@@@
} # logoff
sub new {
- my ($class) = shift;
+ my ($class, %parms) = @_;
=pod
=cut
- my %parms = @_;
-
my $self = {};
$self->{host} = $parms{host} ? $parms{host} : 'localhost';