line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Alice::Signal; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
23
|
use AnyEvent; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
97
|
|
4
|
4
|
|
|
4
|
|
21
|
use Any::Moose; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has type => ( |
7
|
|
|
|
|
|
|
is => 'ro', |
8
|
|
|
|
|
|
|
isa => 'Str', |
9
|
|
|
|
|
|
|
required => 1, |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has app => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'App::Alice', |
15
|
|
|
|
|
|
|
weak_ref => 1, |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub BUILD { |
20
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
21
|
0
|
|
|
|
|
|
my $method = "sig" . lc $self->type; |
22
|
0
|
|
|
|
|
|
$self->$method(); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
sub sigint {$_[0]->app->init_shutdown}; |
26
|
0
|
|
|
0
|
0
|
|
sub sigquit {$_[0]->app->init_shutdown}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
29
|
|
|
|
|
|
|
1; |