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