home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!unipalm!ian
- From: ian@unipalm.co.uk (Ian Phillipps)
- Subject: Re: How do I make traps in perl?
- Message-ID: <1992Sep2.122722.22017@unipalm.co.uk>
- Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK
- References: <1992Aug26.135146.1759@linda.lidac.liu.se> <1992Aug28.190101.9961@netlabs.com>
- Date: Wed, 2 Sep 1992 12:27:22 GMT
- Lines: 19
-
- lwall@netlabs.com (Larry Wall) writes:
-
- > sub CATCHINT {
- > print "OUCH! Don't DO that!!!\n";
- > }
-
- I've wanted the equivalent of a longjmp to allow a sig handler to yank
- me out of nest of routines etc, and plonk me down somewhere standard
- (e.g. a main STDIN-reading loop). The "goto" spec is so discouraging
- that I've not even tried it, and nothing else seems to fit.
-
- I *could* just stay in the handler, but that doesn't have too good
- long-term consquences.
-
- Ian
- --
- Ian Phillipps, Unipalm Ltd, 216 Science Park, Phone +44 223 420002
- Milton Road, Cambridge, CB4 4WA, England. Phax +44 223 426868
- The road to hell is paved with melting snowballs - Larry Wall
-