Re: Net::Telnet - problem with very large buffer
From: Paul (pmacadam_at_gmail.com)
Date: 07/21/04
- Next message: Mark: "Problem with Net::FTP"
- Previous message: Bruno Ethvignot: "The Win32::Perms module ActiverPerl 5.8 is available."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Jul 2004 10:40:14 -0700
Jay,
errmode is set to return in my code.
I seem to have solved my problem by increasing the size of
Net::Telnet's internal buffer to 3 MBs.
Right approach?
PM
Jay Rogers <jay@rgrs.com> wrote in message news:<kwpfz8dx6re.fsf@panix5.panix.com>...
> pmacadam@gmail.com (Paul) writes:
> > The command in question produces at least a 1,000 lines of output.
> > What's strange is absolutely all of the output is in the input_log,
> > but I cannot get a single character from getline().
> >
> > Any thoughts / remedies?
> >
> > Code below:
> >
> > $self->{'telnet'}->input_log('/tmp/telnet.in');
> >
> > @screen = $self->{'telnet'}->cmd(-string=>$cmd_str,
> > -cmd_remove_mode=>1,
> > -prompt=>$self->cli_prompt_str,
> > -timeout=>90,
> > );
>
> You're not checking cmd() for failure. Did you happen to
> change errmode to "return"?
>
> > while ( (my $line = $self->{'telnet'}->getline(-timeout=>15)) )
>
> After invoking get() or getline() you'll have to check for
> for eof().
- Next message: Mark: "Problem with Net::FTP"
- Previous message: Bruno Ethvignot: "The Win32::Perms module ActiverPerl 5.8 is available."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]