in reply to Inconsistancy within Net::FTP?

Looking through the Net::FTP code, I think this is because your tied handle doesn't have a valid file descriptor. Which, I think, would make sense, since it's not actually associated with a real file.

See, Net::FTP calls fileno on the filehandle you pass in; if the result is undef (as it is in your case), it treats the handle as a file path. Which doesn't exist, obviously.

Unfortunately I don't know how to solve your problem. :( It may be just a limitation that can't be fixed.

Update: it turns out that in 5.6 you can define a FILENO method for your tied filehandle class. So you could possibly use that to make Net::FTP work properly with your tied filehandle. The 5.6 perltie is at http://search.cpan.org/doc/GSAR/perl-5.6.0/pod/perltie.pod if you don't have it locally.

Replies are listed 'Best First'.
RE (tilly) 2: Inconsistancy within Net::FTP?
by tilly (Archbishop) on Aug 23, 2000 at 23:38 UTC
    IMNSHO calling fileno on a tied filehandle should case some screaming and shouting. Or at least a warning?
      I definitely agree. And, while it makes conceptual sense, I think it should also be mentioned in the docs for tying filehandles. Of course, it could be; I didn't look very hard. :)

      But I agree, a warning/fatal error would definitely be welcome in such a scenario.