in reply to Re: STDIN and STDOUT as a single filehandle?
in thread STDIN and STDOUT as a single filehandle?

Okay I get the gist of that, but as it was with the 'ReadOneWriteOther.pm' I was getting an error:
Can't locate object method "FILENO" via package "ReadOneWriteOther" at /usr/lib/perl5/site_perl/5.8.0/Net/Telnet.pm line 560.
So I figured I had to just add a 'sub FILENO' in and choose to return either 'fileno $self->{in}' or out, but neither worked. Both get the error:
stat() on unopened filehandle TERM at /usr/lib/perl5/site_perl/5.8.0/Net/Telnet.pm line 578.
... and then when I open the shell with Net::SSH::Perl, it uses STDIN and STDOUT on the terminal as before. So I get the idea, but I'm stuck again. Any further help would be appreciated.

Thanks,
Scott

  • Comment on Re: Re: STDIN and STDOUT as a single filehandle?

Replies are listed 'Best First'.
Re: Re: Re: STDIN and STDOUT as a single filehandle?
by gmpassos (Priest) on Jun 01, 2004 at 06:09 UTC
    Just add AUTOLOAD to handle not implemented methods:
    sub AUTOLOAD {}
    Take a look in perltie to implement all the other methods if you really want to make a full IO redirection through tie.

    Here's a list of the other methods:

    sub PRINTF {} sub READ {} sub READLINE {} sub GETC {} sub WRITE {} sub FILENO {} sub STORE {} sub FETCH {} sub CLOSE {} sub DESTROY {}

    Graciliano M. P.
    "Creativity is the expression of the liberty".