in reply to Net::FTP Wrapper: TCP problem

Presumably you are setting something so that $self->ftp can return it ?

Why don't you store this as you are doing with 'host' ?

# in create_connection $self->set('ftp',$ftp); #in send_file my $ftp = $self->get('ftp');

--
Brovnik

Replies are listed 'Best First'.
Re: Re: Net::FTP Wrapper: TCP problem
by graq (Curate) on May 31, 2001 at 15:58 UTC
    From the same package:
    sub ftp { return $_[0]->get('connection'); }
    Thus I get the current connection or create a new one if I need to.
    So, in essence, I do as you suggest, but I leave it generic - passing the control of the connection details to another object.

    Do you think it is a reason why the TCP connection disappears at one end?
    What really confuses me is that the problem occurs sporadically - and I cannot recreate the error.

    - Graq