Subject: [ANNOUNCE] AtExit-2.00 Uploaded to CPAN
From: [email-masked] (Brad Appleton)
Date: 26 Nov 1998 03:36:17 GMT
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules

Version 2.00 of the AtExit module has been uploaded to CPAN.

AtExit is a fairly simple and straightforward module that provides
atexit(3C) functionality from Perl. This is trivial to do with END{}
blocks, and in fact the first versions of the module were simply to
show a friend of mine just how easy it was (the docs were way longer
than the code).

Then Michael A. Chase <[email-masked]> emailed me some changes
made to extend it to provide exit/cleanup processing for end-of-scope
(in addition to end-of-program). I tried to keep the interface more
consistent with what exists, but the basic idea was easy enough to
do without much in the way of extra code. I just had to make several
of the functions be callable as methods as well. 

Now you can atexit() and rmexit() to register & unregister "cleanup"
callbacks to invoke at program-exit.

And you can create an AtExit object using something like:
   $scope = AtExit->new();
and then use use $scope->atexit() and $scope->rmexit() to register &
unregister "cleanup" callbacks to invoke when the $scope object goes
away.

Once again, the modifications to the code were few, but the mods to the
docs were more involved (new functionality, but not much new code ;-)

Here is the information from the README file for version 2.00 of AtExit:

 WHAT IS THIS?
 =============
 This is "AtExit", a Perl5 module which exports a function name "atexit()"
 to perform ANSI-C style exit processing for Perl5 programs; and a class
 named "AtExit" to register clean-up functions for any variable-scope in
 which the AtExit object is defined.

 AUTHORS/CONTRIBUTORS
 ====================
 Andrew Langmead <[email-masked]> (initial draft).

 Brad Appleton <[email-masked]> (Version 1.02 and 2.00).

 Michael A. Chase <[email-masked]> (Version 2.00).

[...]

 HISTORY
 =======
 18-Oct-1998           Brad Appleton               <[email-masked]>
 -----------------------------------------------------------------------------
 Version 2.00
 Made the following changes based on patches contributed by Michael Chase
 - AtExit may now be used as a class to create objects which invoke callbacks
   whenever the AtExit object is destroyed (or goes out of scope with no
   other references to it).

 - atexit() and rmexit() may now be invoked as functions, or as methods.
   When invoked as methods, they operate on an object for destruction-time
   callbacks. Otherwise they operate on the program for program-exit-time
   callbacks.

 - Added the exit_subs(), is_exiting() and ignore_when_exiting() subroutines
   to replace the use of @AtExit::EXIT_SUBS, $AtExit::EXITING, and
   $AtExit::IGNORE_WHEN_EXITING. Use of these three variables is now
   deprecated in favor of these new subroutines.

   Although atexit & rmexit are still exported (for backward compatibility),
   exit_subs(), is_exiting() and ignore_when_exiting() are NOT exported
   by default.

 - $AtExit::EXITING, $AtExit::IGNORE_WHEN_EXITING, and @AtExit::EXIT_SUBS
   are now merely aliases to a class hash/object.

[...]

Please see the README file in the distribution for details regarding previous
versions, as well as copyrights, disclaimers, and installation.

-- 
Brad Appleton <[email-masked]> | http://www.enteract.com/~bradapp/
 "And miles to go before I sleep."   |  3700+ WWW links on CS & Sw-Eng