OP here. Looks like the MyTelnet->_fillbuf function is never actually called, due to some inheritance problem.
Darned if I can see why inheritance doesn't work as expected:
#!/usr/bin/perl --
my $connectObj = MyTelnet->new();
$connectObj->open(
Host => 'iberiamud.mooo.com',
Port => 5900,
);
while (1) {} # Poor man's main loop
{ package MyTelnet;
use base ("Net::Telnet");
sub _fillbuf {
print "This function is never called\n";
print "Base class's ->_fillbuf function is called instead\n";
}
}
Regarding the call to inflate. My production code (which probably has no inheritance problems, as it generates billions of debug messages that actually appear) was producing:
Error: No output
status: data error
msg: incorrect header check
I tried ignoring everything before the first ASCII 120 character, which is where the zlib stream is supposed to start. The first couple of calls to Compress::Zlib->inflate then succeed. After that, we're back to square one, with new error messages:
Error: No output
status: data error
msg: invalid code lengths set
The zlib docs suggest this kind of error appears if the compressed stream is corrupted, but I haven't yet found anything in Net::Telnet that might be responsible. |