Subject: | unable to send empty string |
Date: | Tue, 26 Jul 2011 16:20:11 -0700 |
To: | bug-Net-SSH-Expect [...] rt.cpan.org |
From: | Mark Mertel <mmertel [...] dataram.com> |
I have a slight problem with your module in sending an empty string
using the send method. It croaks.
I have a local modification which checks defined instead:
8 # Net::SSH::Expect::send does not allow the empty string which
9 # is what we need sometimes, so until it gets fixed we need to
10 # override the send method
11 no warnings 'redefine';
12 sub Net::SSH::Expect::send {
13 my Net::SSH::Expect $self = shift;
14 my $send = shift;
15 croak ("IllegalArgument" . " missing argument 'string'.")
16 *unless defined $send;*
17 my $exp = $self->get_expect();
18 my $t = $self->{terminator};
19 $exp->send($send . $t);
20 }
21 use warnings;
Maybe you could incorporate this in the package. Thanks
--
Mark Mertel
mmertel@dataram.com
206.441.4663