in reply to How aggressively does Perl clean up when you exit()?
You can make sure your database handles are closed down correctly by calling the disconnect method in an END block.
END { defined $db and $db->disconnect; }
There is also a module on CPAN yclept1 AtExit that I have never used. For all I know, it predates the appearance of END blocks, but it may be worth a look.
1. Chatterbox silliness. yclept is very olde english, meaning "named".
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How aggressively does Perl clean up when you exit()?
by Fletch (Bishop) on Nov 15, 2001 at 07:41 UTC |