|
From: Roland G. <r.g...@xs...> - 2001-04-05 14:29:49
|
Simon Taylor wrote:
> I cannot start to get the equivalent functionality in the perl interact, ie:
>
> print "$prog: Handing control back to the user on $host...\n";
> $Expect::Log_Stdout=1;
> $telnet->interact(\*STDIN, "~~r");
>
> Am I doing something wrong?
No, this is a bug in the interact routine which will be fixed in the
next release, which I hopefully will find time for after my
easter vacation next week.
I'm attaching a patch from Jorgen Wahlsten <jo...@ti...>
for those who need it in the meantime.
Happy Easter!
Roland
--
RGi...@cp...
*** Expect.pm Wed Mar 21 17:01:43 2001
--- Expect.pm.DIST Mon Feb 19 05:21:22 2001
***************
*** 1055,1063 ****
foreach $escape_sequence (keys(%{${*$read_handle}{exp_Function}})) {
print STDERR "Tested escape sequence $escape_sequence from ${*$read_handle}{exp_Pty_Handle}"if ${*$read_handle}{"exp_Debug"} > 1;
# Make sure it doesn't grow out of bounds.
! if ((defined(${*$read_handle}{"exp_Max_Accum"}) &&
! (${*$read_handle}{"exp_Max_Accum"}) &&
! (length($escape_character_buffer)) > ${*$read_handle}{"exp_Max_Accum"})) {
$offset = length($escape_character_buffer) - ${*$read_handle}{"exp_Max_Accum"};
$escape_character_buffer = substr($escape_character_buffer,$offset,${*$read_handle}{"exp_Max_Accum"});
}
--- 1055,1061 ----
foreach $escape_sequence (keys(%{${*$read_handle}{exp_Function}})) {
print STDERR "Tested escape sequence $escape_sequence from ${*$read_handle}{exp_Pty_Handle}"if ${*$read_handle}{"exp_Debug"} > 1;
# Make sure it doesn't grow out of bounds.
! if ((defined(${*$read_handle}{"exp_Max_Accum"}) &&(length($escape_character_buffer)) > ${*$read_handle}{"exp_Max_Accum"})) {
$offset = length($escape_character_buffer) - ${*$read_handle}{"exp_Max_Accum"};
$escape_character_buffer = substr($escape_character_buffer,$offset,${*$read_handle}{"exp_Max_Accum"});
}
|