+ add some explanation
This commit is contained in:
parent
5c036a2918
commit
a45440caa4
|
@ -40,10 +40,19 @@ sub new {
|
||||||
$self->{plugin} = undef;
|
$self->{plugin} = undef;
|
||||||
$self->{help} = undef;
|
$self->{help} = undef;
|
||||||
|
|
||||||
|
# Avoid to destroy because it keeps a ref on the object.
|
||||||
|
# A problem if we execute it multiple times in the same perl execution
|
||||||
|
# Use prepare_destroy
|
||||||
$self->set_signal_handlers;
|
$self->set_signal_handlers;
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub prepare_destroy {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
delete $handlers{DIE}->{$self};
|
||||||
|
}
|
||||||
|
|
||||||
sub set_signal_handlers {
|
sub set_signal_handlers {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue