in reply to About Net:FTP:Autoreconnect

My program is good there is no flaws in it. I am sure. Is it a bug in the module?
You may wish to re-evaluate how you define being sure.
sub _close { my $data = shift; my $ftp = ${*$data}{'net_ftp_cmd'}; $data->SUPER::close(); delete ${*$ftp}{'net_ftp_dataconn'} ################# LINE 54 if exists ${*$ftp}{'net_ftp_dataconn'} && $data == ${*$ftp}{'net_ftp_dataconn'};
$ perl -MNet::FTP -MNet::FTP::dataconn -le ' Net::FTP::dataconn->new-> +close ' Can't use an undefined value as a symbol reference at /usr/lib/perl5/5 +.10.0/Net/FTP/dataconn.pm line 54.

Replies are listed 'Best First'.
Re^2: About Net:FTP:Autoreconnect
by cnarun86 (Initiate) on Mar 07, 2009 at 11:50 UTC
    Thanks for the reply

    My program runs successfully for most of the times. If there is any error in the program then how it is running successfully.

    This error will occur rarely but fatal.It occurs(mostly) while using ls command as follows

    my @ftpfiles=$ftp->ls or die "cannot get file list; print "Got file list\n";
    It is also not printing the statement in the die. Whats the problem?

    Waiting for the bless

    Arun Kumar C.N

      It is also not printing the statement in the die. Whats the problem?
      Then obviously this isn't where your program is dying. Have you used the debugger? Used print statements or Data::Dumper calls judiciously?

      If the problem occurs with any regularity (as you say it does), it's deterministic.