Skip Menu |

This queue is for tickets about the Term-Pulse CPAN distribution.

Report information
The Basics
Id: 86865
Status: resolved
Priority: 0/
Queue: Term-Pulse

People
Owner: Nobody in particular
Requestors: arfreitas [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.04
Fixed in: (no value)



Subject: include in the Pod proper procedure to die
Hi there, I got some bugs in my code while running Term::Pulse and even after a die() being called (by my code) Term::Pulse keep running. To avoid such issues, it would be nice to include a reference to creating a callback to $SIG{__DIE__} as described in perlpod -f die: doing that makes it possible to call pulse_stop() before die(), like this: $SIG{__DIE__} = sub { pulse_stop() }; Just my $0,02 to improve Term::Pulse. ;-) My best regards, Alceu
在 2013-七月-11 16:15:55 星期四 時,ARFREITAS 寫到: Show quoted text
> Hi there, > > I got some bugs in my code while running Term::Pulse and even after a > die() being called (by my code) Term::Pulse keep running. > > To avoid such issues, it would be nice to include a reference to > creating a callback to $SIG{__DIE__} as described in perlpod -f die: > doing that makes it possible to call pulse_stop() before die(), like > this: > > $SIG{__DIE__} = sub { pulse_stop() }; > > Just my $0,02 to improve Term::Pulse. ;-) > > My best regards, > Alceu
Hi Alceu, Thanks for your suggestion. It has been added in v0.05. - Alec
Em Seg Jul 15 06:03:08 2013, ALEC escreveu: Show quoted text
> Hi Alceu, > > Thanks for your suggestion. It has been added in v0.05. > > - Alec
Additionally, consider adding to the Pod a suggestion to create a handler for $SIG{INT}: $SIG{INT} = sub { die "Caught interrupt signal" }; By using both handlers, it is possible to stop Term::Pulse smoothly. Regards, Alceu