Amethyst/Brain.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 33 CC 2 SCAR 11.0
CC
2
Cov
0%
new
6.0
init
2.0
think
2.0
CRAP 3.0
1 package Amethyst::Brain;
2  
3 use strict;
4 use Data::Dumper;
5 use POE;
6  
7 sub new {
8 my $class = shift;
9 my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ };
10 return bless $self, $class;
11 }
12  
13 sub init {
14 my ($self) = @_;
15 # Not overriding this is not fatal.
16 }
17  
18 sub think {
19 my ($self, $messages, @args) = @_;
20 die "Think not implemented by brain";
21 }
22  
23 sub reply_to {
24 my ($self, $message, $text) = @_;
25 return $message->reply($text);
26 }
27  
28 1;