| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package API::Matterbridge::Message; |
|
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
31
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
31
|
|
|
4
|
1
|
|
|
1
|
|
644
|
use Moo 2; |
|
|
1
|
|
|
|
|
2762
|
|
|
|
1
|
|
|
|
|
10
|
|
|
5
|
1
|
|
|
1
|
|
2258
|
use JSON 'decode_json'; |
|
|
1
|
|
|
|
|
9976
|
|
|
|
1
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
653
|
use Filter::signatures; |
|
|
1
|
|
|
|
|
18314
|
|
|
|
1
|
|
|
|
|
18
|
|
|
8
|
1
|
|
|
1
|
|
43
|
use feature 'signatures'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
33
|
|
|
9
|
1
|
|
|
1
|
|
5
|
no warnings 'experimental::signatures'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
172
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# This is just a hash-with-(currently no)-methods |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has [ |
|
16
|
|
|
|
|
|
|
"text", |
|
17
|
|
|
|
|
|
|
"channel", |
|
18
|
|
|
|
|
|
|
"username", |
|
19
|
|
|
|
|
|
|
"userid", |
|
20
|
|
|
|
|
|
|
"avatar", |
|
21
|
|
|
|
|
|
|
"account", |
|
22
|
|
|
|
|
|
|
"event", |
|
23
|
|
|
|
|
|
|
"protocol", |
|
24
|
|
|
|
|
|
|
"gateway", |
|
25
|
|
|
|
|
|
|
"parent_id", |
|
26
|
|
|
|
|
|
|
"timestamp", |
|
27
|
|
|
|
|
|
|
"id", |
|
28
|
|
|
|
|
|
|
"Extra", |
|
29
|
|
|
|
|
|
|
] => ( |
|
30
|
|
|
|
|
|
|
is => 'ro', |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
0
|
|
sub from_bytes( $class, $bytes ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $class->new( decode_json($bytes)) |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
0
|
|
sub reply( $msg, $text, %options ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my %reply = ( |
|
39
|
|
|
|
|
|
|
gateway => $msg->gateway, |
|
40
|
|
|
|
|
|
|
text => $text, |
|
41
|
|
|
|
|
|
|
%options |
|
42
|
|
|
|
|
|
|
); |
|
43
|
0
|
|
|
|
|
|
return (ref $msg)->new(\%reply) |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 REPOSITORY |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
The public repository of this module is |
|
52
|
|
|
|
|
|
|
L. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SUPPORT |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
The public support forum of this module is L. |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 BUG TRACKER |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Please report bugs in this module via the Github bug queue at |
|
61
|
|
|
|
|
|
|
L |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Max Maischein C |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT (c) |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright 2020 by Max Maischein C. |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 LICENSE |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This module is released under the same terms as Perl itself. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |