Amethyst/Brain/Infobot/Module/Cool.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
action
2.0
BEGIN
2.0
CRAP 2.0
1 package Amethyst::Brain::Infobot::Module::Cool;
2  
3 use strict;
4 use vars qw(@ISA);
5 use Amethyst::Message;
6 use Amethyst::Brain::Infobot;
7 use Amethyst::Brain::Infobot::Module;
8  
9 @ISA = qw(Amethyst::Brain::Infobot::Module);
10  
11 sub new {
12 my $class = shift;
13 my $self = $class->SUPER::new(
14 Name => 'Cool',
15 Regex => qr/^(?:neat|cool)(?:[!.])?$/i,
16 Usage => 'cool',
17 Description => "Be Cool",
18 @_
19 );
20  
21 return bless $self, $class;
22 }
23  
24 sub action {
25 my ($self, $message) = @_;
26  
27 my $reply = $self->reply_to($message, 'cool ' x (2 + rand(5)));
28 $reply->send;
29  
30 return 1;
31 }
32  
33 1;