Subject: | Can login password prompt be tailord |
Distribution:3.03
Perl version:5.8.6
OS:Linux
Could you please make a minor but extremely helpful (I think)change to Telnet module,
make the password prompt be tailed by user on method invocation.
So that when password prompt like "password for <userid>" could be handled by Telenet
module smoothly without reinventing the wheel except this minor difference.
/Net/Telnet.pm
1121 ## Wait for password prompt.
1122 $self->waitfor(Match => '/password[: ]*$/i',
1123 Errmode => "return")
1124 or do {
1125 return &$error("eof read waiting for password prompt")
1126 if $self->eof;
1127 return &$error("timed-out waiting for password prompt");
1128 };
I think just change Line 1121 to $self->waitfor(Match => $pwd_prompt]*$/i',
where $pwd_prompt is an optional parameter with default value '/password[: ]*$/i'.
Thank you very much.