Registerable: add unregister_all() subroutine

This commit is contained in:
Pragmatic Software 2020-02-15 07:26:29 -08:00
parent edf735f88a
commit ecd1e4dc86
1 changed files with 5 additions and 0 deletions

View File

@ -62,4 +62,9 @@ sub unregister {
@{ $self->{handlers} } = grep { $_ != $ref } @{ $self->{handlers} };
}
sub unregister_all {
my ($self) = @_;
$self->{handlers} = [];
}
1;