| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package BalanceOfPower::Role::Herald; |
|
2
|
|
|
|
|
|
|
$BalanceOfPower::Role::Herald::VERSION = '0.400105'; |
|
3
|
13
|
|
|
13
|
|
4638
|
use strict; |
|
|
13
|
|
|
|
|
18
|
|
|
|
13
|
|
|
|
|
310
|
|
|
4
|
13
|
|
|
13
|
|
110
|
use v5.10; |
|
|
13
|
|
|
|
|
27
|
|
|
5
|
13
|
|
|
13
|
|
43
|
use Moo::Role; |
|
|
13
|
|
|
|
|
15
|
|
|
|
13
|
|
|
|
|
96
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with 'BalanceOfPower::Role::Reporter'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
requires 'get_nation'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub broadcast_event |
|
12
|
|
|
|
|
|
|
{ |
|
13
|
414
|
|
|
414
|
0
|
397
|
my $self = shift; |
|
14
|
414
|
|
|
|
|
324
|
my $event = shift; |
|
15
|
414
|
|
|
|
|
548
|
my @nations = @_; |
|
16
|
414
|
|
|
|
|
989
|
$self->register_event($event); |
|
17
|
414
|
|
|
|
|
709
|
for(@nations) |
|
18
|
|
|
|
|
|
|
{ |
|
19
|
565
|
|
|
|
|
1279
|
my $nation = $self->get_nation($_); |
|
20
|
565
|
|
|
|
|
1139
|
$nation->register_event($event); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
sub send_event |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
26
|
1
|
|
|
|
|
3
|
my $event = shift; |
|
27
|
1
|
|
|
|
|
2
|
my @nations = @_; |
|
28
|
1
|
|
|
|
|
3
|
for(@nations) |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
1
|
|
|
|
|
3
|
my $nation = $self->get_nation($_); |
|
31
|
1
|
|
|
|
|
3
|
$nation->register_event($event); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
1; |