home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5314 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.1 KB

  1. Path: sparky!uunet!gatech!rutgers!dziuxsolim.rutgers.edu!piecomputer.rutgers.edu!mende
  2. From: mende@piecomputer.rutgers.edu (Bob Mende Pie)
  3. Newsgroups: comp.lang.perl
  4. Subject: die hook
  5. Message-ID: <Aug.13.17.56.21.1992.22441@piecomputer.rutgers.edu>
  6. Date: 13 Aug 92 21:56:22 GMT
  7. Organization: 40.34N / 74.44W +25m Sol 3
  8. Lines: 14
  9.  
  10.  
  11.    I am currently working on a set of programs that use common "required"
  12. packages.  I use the die command in many of the different monules and
  13. packages.  Depending on what main program I use to invoke the program, I
  14. would possibly like to add a "hook" to the die command that would run a
  15. subroutine before exiting.  It could be used for cleaning up lockfiles,
  16. saving the state of arrays, whatever.  Since I can not be sure how my
  17. modules will be called this hook may or not be in existance.   Is there a
  18. subroutine that die will try to call when it is invoked.   If not this
  19. would be a useful addition.   It could be as simple as the perl code:
  20.     &'die if defined &'die;
  21. -- 
  22.                     /Bob...
  23. {...}!rutgers!mende      mende@piecomputer.rutgers.edu      mende@zodiac.bitnet
  24.