in reply to Re: Net::FTP quit terminates Perl script
in thread Net::FTP quit terminates Perl script

I ran your testcase in and out of the debugger and you're correct- I have the same result.

In my case there must be something else going on, because I get this:

DB<6> l 281==>b closedir DIR; 282: $ftph->quit(); 283 284: open STDERR, ">&OLD_STDERR"; 285 286: $result->{status} = 0; 287: return $result;
and when I press n 2 times...
DB<6> n genericFTP::ftpFiles(/var/www/cgi-bin/orderform/genericFTP.pm:282): 282: $ftph->quit(); DB<6> n Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info.

Replies are listed 'Best First'.
Re^3: Net::FTP quit terminates Perl script
by misterperl (Friar) on Jul 15, 2015 at 17:34 UTC
    Turned out that $ftph had gone out of scope and was undef. But instead of telling me that, Perl decided to go to

    CGI::DESTROY

    for some reason, which quickly lead to an exit without reporting anything. and use strict and warning didn't throw anything.

    Once I fixed the scope everything was fine. What an odd way to (NOT) report the object was undef!? If Perl had simply said object $ftph not defined, it would have been a 1 second fix.

    Thanks for your tip I voted you ++