Re: $Event::DIED isn't doing what I expected
[email protected] (Paul Sharpe)
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 6 Dec 2000, Joshua N Pritikin wrote: > On Wed, Dec 06, 2000 at 06:21:25PM +0000, [email protected] wrote: > > <man> > > If you do not want to continue looping after an error, you can do > > something like this: > > > > $Event::DIED = sub { die &Event::verbose_exception_handler(@_) }; > > </man> > > > > I did that and I get this trap message > > > > Event: trapped error: <my_error/> > > in Event::timer=HASH(0x85b52dc) -- > > [...snip...] > > Event: '?? foo:97' died and then $Event::DIED died with: 1 at foo line 86. > > > > but my loop() seems to keep going. What am I missing :( > > Oops! i'll correct the documentation. Does this do what you want? > > $Event::DIED = sub { > Event::unloop(); > warn &Event::verbose_exception_handler(@_); > }; Yeah. I thought you might suggest that ;-) Cheers, paul -- Paul Sharpe Tel: +44 (20) 7407 5557 Miraclefish Ltd. Fax: +44 (20) 7378 8711 Studio 12 mailto:[email protected] 37 Tanner Street London SE1 3LF UNITED KINGDOM