line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::Dukedom::Signal; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
2518
|
use Moo; |
|
4
|
|
|
|
|
59731
|
|
|
4
|
|
|
|
|
22
|
|
4
|
|
|
|
|
|
|
with 'Throwable'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use overload |
7
|
4
|
|
|
|
|
22
|
q{""} => 'as_string', |
8
|
4
|
|
|
4
|
|
11437
|
fallback => 1; |
|
4
|
|
|
|
|
4158
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has display => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
default => undef, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has action => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
default => undef, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has default => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
default => undef, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub as_string { |
26
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
return $self->display; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Games::Dukedom::Signal = provide "interrupts" to drive the state-machine |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use Games::Dukedom; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $game = Games::Dukedom->new(); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module is used to signal the application code that a display or input |
52
|
|
|
|
|
|
|
action is needed. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ACCESSORS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 display |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 action |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 default |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 METHODS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 as_string |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This method will provide a string representing the error, containing the |
67
|
|
|
|
|
|
|
error's message. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Jim Bacon, E<lt>jim@nortx.comE<gt> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Copyright (C) 2014 by Jim Bacon |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
78
|
|
|
|
|
|
|
under the same terms as Perl itself, either Perl version or, |
79
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|