| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package BalanceOfPower::Role::Herald; |
|
2
|
|
|
|
|
|
|
$BalanceOfPower::Role::Herald::VERSION = '0.400115'; |
|
3
|
13
|
|
|
13
|
|
5693
|
use strict; |
|
|
13
|
|
|
|
|
24
|
|
|
|
13
|
|
|
|
|
388
|
|
|
4
|
13
|
|
|
13
|
|
141
|
use v5.10; |
|
|
13
|
|
|
|
|
35
|
|
|
5
|
13
|
|
|
13
|
|
51
|
use Moo::Role; |
|
|
13
|
|
|
|
|
16
|
|
|
|
13
|
|
|
|
|
81
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with 'BalanceOfPower::Role::Reporter'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
requires 'get_nation'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub broadcast_event |
|
12
|
|
|
|
|
|
|
{ |
|
13
|
404
|
|
|
404
|
0
|
490
|
my $self = shift; |
|
14
|
404
|
|
|
|
|
384
|
my $event = shift; |
|
15
|
404
|
|
|
|
|
656
|
my @nations = @_; |
|
16
|
404
|
|
|
|
|
1149
|
$self->register_event($event); |
|
17
|
404
|
|
|
|
|
932
|
for(@nations) |
|
18
|
|
|
|
|
|
|
{ |
|
19
|
539
|
|
|
|
|
1730
|
my $nation = $self->get_nation($_); |
|
20
|
539
|
|
|
|
|
1358
|
$nation->register_event($event); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
sub send_event |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
26
|
1
|
|
|
|
|
2
|
my $event = shift; |
|
27
|
1
|
|
|
|
|
2
|
my @nations = @_; |
|
28
|
1
|
|
|
|
|
3
|
for(@nations) |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
1
|
|
|
|
|
6
|
my $nation = $self->get_nation($_); |
|
31
|
1
|
|
|
|
|
4
|
$nation->register_event($event); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
1; |