line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::Dukedom::Signal; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = 'v0.1.2'; |
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
1909
|
use Moo; |
|
4
|
|
|
|
|
48744
|
|
|
4
|
|
|
|
|
18
|
|
6
|
|
|
|
|
|
|
with 'Throwable'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload |
9
|
4
|
|
|
|
|
17
|
q{""} => 'as_string', |
10
|
4
|
|
|
4
|
|
8936
|
fallback => 1; |
|
4
|
|
|
|
|
3412
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
around BUILDARGS => sub { |
13
|
|
|
|
|
|
|
my $orig = shift; |
14
|
|
|
|
|
|
|
my $class = shift; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
unshift( @_, 'msg' ) if @_ == 1 && !ref( $_[0] ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return $class->$orig( {@_} ); |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has msg => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
default => undef, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has action => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
default => undef, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has default => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
default => undef, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub as_string { |
37
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $str = ref($self); |
40
|
0
|
|
|
|
|
|
for ( keys(%{$self}) ) { |
|
0
|
|
|
|
|
|
|
41
|
0
|
|
0
|
|
|
|
$str .= "\n $_: " . ($self->{$_} || ''); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return $str; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |