line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bot::Cobalt::Core::Sugar; |
2
|
|
|
|
|
|
|
$Bot::Cobalt::Core::Sugar::VERSION = '0.021001'; |
3
|
8
|
|
|
8
|
|
24
|
use strictures 2; |
|
8
|
|
|
|
|
35
|
|
|
8
|
|
|
|
|
224
|
|
4
|
8
|
|
|
8
|
|
971
|
use Carp; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
325
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
1438
|
use parent 'Exporter::Tiny'; |
|
8
|
|
|
|
|
850
|
|
|
8
|
|
|
|
|
35
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT = qw/ |
9
|
|
|
|
|
|
|
core |
10
|
|
|
|
|
|
|
broadcast |
11
|
|
|
|
|
|
|
logger |
12
|
|
|
|
|
|
|
register |
13
|
|
|
|
|
|
|
unregister |
14
|
|
|
|
|
|
|
plugin_cfg |
15
|
|
|
|
|
|
|
plugin_alias |
16
|
|
|
|
|
|
|
irc_object |
17
|
|
|
|
|
|
|
irc_context |
18
|
|
|
|
|
|
|
/; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub core { |
21
|
0
|
|
|
0
|
1
|
|
require Bot::Cobalt::Core; |
22
|
0
|
0
|
|
|
|
|
confess "core sugar called but no Bot::Cobalt::Core instance" |
23
|
|
|
|
|
|
|
unless Bot::Cobalt::Core->has_instance; |
24
|
0
|
|
|
|
|
|
Bot::Cobalt::Core->instance |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub broadcast (@) { core->send_event(@_) } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub logger { core->log } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub register (@) { core->plugin_register( @_ ) } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub unregister (@) { core->plugin_register( @_ ) } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub plugin_cfg ($) { core->get_plugin_cfg( @_ ) } |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub plugin_alias ($) { core->get_plugin_alias( @_ ) } |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub irc_object ($) { core->get_irc_object( @_ ) } |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
sub irc_context ($) { core->get_irc_context( @_ ) } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |