git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3850
bd8105ee-0ff8-0310-8827-fb3f25b6796d
--- /dev/null
+package Devel::REPL::Plugin::Interrupt;
+
+use Moose::Role;
+use namespace::clean -except => [ 'meta' ];
+
+around 'eval' => sub {
+ my $orig = shift;
+ my ($self, $line) = @_;
+
+ local $SIG{INT} = sub {
+ die "Interrupted.\n";
+ };
+
+ return $self->$orig($line);
+};
+
+1;
+