resolve rt.cpan#44919 fix deprecated use of compute_all_applicable_methods
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Interrupt.pm
CommitLineData
54d0f9a0 1package Devel::REPL::Plugin::Interrupt;
2
6a5409bc 3use Devel::REPL::Plugin;
54d0f9a0 4use namespace::clean -except => [ 'meta' ];
5
6around 'eval' => sub {
7 my $orig = shift;
8 my ($self, $line) = @_;
9
10 local $SIG{INT} = sub {
11 die "Interrupted.\n";
12 };
13
14 return $self->$orig($line);
15};
16
171;
18
cfd1094b 19__END__
20
21=head1 NAME
22
23Devel::REPL::Plugin::Interrupt - traps SIGINT to kill long-running lines
24
30b459d4 25=head1 AUTHOR
26
27Shawn M Moore, C<< <sartak at gmail dot com> >>
28
cfd1094b 29=cut
30