Silly/MakeMoneyAtHome.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
« Silly/BoneEasy.pm ↑ Summary Silly/DailyFail.pm »
1 package Bot::Cobalt::Plugin::Silly::MakeMoneyAtHome;
2 $Bot::Cobalt::Plugin::Silly::MakeMoneyAtHome::VERSION = '0.031002';
3 1 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 0 ▶use Bot::Cobalt::Common;
Subroutine BEGIN: called CC=1 SCAR=2.6
6  
7 use Acme::MakeMoneyAtHome;
8  
9 sub new { bless [], shift }
10  
11 sub Cobalt_register {
12 my ($self, $core) = splice @_, 0, 2;
13
14 $core->plugin_register( $self, SERVER => 'public_cmd_makemoney' );
15
16 $core->log->info("Loaded");
17  
18 return PLUGIN_EAT_NONE
19 }
20  
21 sub Cobalt_unregister {
22 my ($self, $core) = splice @_, 0, 2;
23  
24 $core->log->info("Unloaded");
25  
26 return PLUGIN_EAT_NONE
27 }
28  
29 sub Bot_public_cmd_makemoney {
30 my ($self, $core) = splice @_, 0, 2;
31  
32 my $msg = ${ $_[0] };
33 my $context = $msg->context;
34  
35 my $resp = make_money_at_home;
36  
37 my $channel = $msg->channel;
38  
39 $core->send_event( 'send_message',
40 $context,
41 $channel,
42 $resp
43 ) if $resp;
44
45 return PLUGIN_EAT_ALL
46 }
47  
48 1;
49 __END__
« Silly/BoneEasy.pm ↑ Summary Silly/DailyFail.pm »