Just another Perl shrine | |
PerlMonks |
Re: Re: $ENV{TERM} and Net::Telnetby bbutler (Initiate) |
on Jun 12, 2002 at 18:12 UTC ( [id://173949]=note: print w/replies, xml ) | Need Help?? |
this was the key. thanks much, fastolfe! the solution by mr. muskrat was interesting, but really not the right way to go about this. thanks to him also though. the reply by abigail is not right - Net::Telnet *does* correctly implement the telnet protocol, and establishes the connection in the proper way. i was under the impression that the terminal type was always negotiated in a telnet session, but this is not the case. it turns out in my particular application, the remote client asks for the terminal type, but that particular negotiation is *not* enabled by default, so the local side was rejecting the request. i figured this out by doing a $connection->option_log('option.log'); statement (equivalently, i could have included the option in the object creation, but i like to keep them separate - makes it easier to comment them out as i go). so, i had to figure out how to make the local side not only accept a request for the terminal type, but then to send it back to the remote client. this is not trivial. fortunately, i found some help on the web at: http://dbforums.com/archive/96/2002/02/1/256002 which shows how to do it. note that this takes advantage of a completely undocumented part of Net::Telnet (suboption_callback), and if i had not found this example on the web, i would have been pulling my hair out for days trying to figure it out. so, here is the modified code, which works perfectly: thanks again to fastolfe for pointing me in the right direction! bbutler
In Section
Seekers of Perl Wisdom
|
|