| 1 | package Reply::Plugin::Interrupt; | ||
| 2 | 1 | our $AUTHORITY = 'cpan:DOY'; | |
| 3 | 1 | $Reply::Plugin::Interrupt::VERSION = '0.42'; | |
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | # ABSTRACT: allows using Ctrl+C to interrupt long-running lines | ||
| 7 | |||
| 8 | 1 | ▶ | use base 'Reply::Plugin'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | |||
| 11 | 0 | ▶ | sub compile { |
|
Subroutine
compile: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 12 | 0 | my $self = shift; | |
| 13 | 0 | my ($next, @args) = @_; | |
| 14 | |||
| 15 | 0 | ▶ | local $SIG{INT} = sub { die "Interrupted" }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 16 | 0 | $next->(@args); | |
| 17 | } | ||
| 18 | |||
| 19 | 0 | ▶ | sub execute { |
|
Subroutine
execute: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 20 | 0 | my $self = shift; | |
| 21 | 0 | my ($next, @args) = @_; | |
| 22 | |||
| 23 | 0 | ▶ | local $SIG{INT} = sub { die "Interrupted" }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 24 | 0 | $next->(@args); | |
| 25 | } | ||
| 26 | |||
| 27 | 1 | 1; | |
| 28 | |||
| 29 | __END__ | ||