blob: a5c2b376072ff34b86cb6e090e3a427bd16ed57b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package Reply::Plugin::Interrupt;
use strict;
use warnings;
use base 'Reply::Plugin';
sub compile {
my $self = shift;
my ($next, @args) = @_;
local $SIG{INT} = sub { die "Interrupted" };
$next->(@args);
}
sub execute {
my $self = shift;
my ($next, @args) = @_;
local $SIG{INT} = sub { die "Interrupted" };
$next->(@args);
}
1;
|