Summon.pm

filter: Statementstmt 57.8% 11 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 53.3% 16 / 30 CC 3 SCAR 17.7
CC
3
Cov
48%
said
12.0
help
2.0
BEGIN
1.0
CRAP 5.9
« Zippy.pm ↑ Summary Magic8Ball.pm »
1 package Bot::BasicBot::Pluggable::Module::Summon;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Bot::BasicBot::Pluggable::Module;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw(Bot::BasicBot::Pluggable::Module);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 my @yows;
8  
9 0 ▶sub said {
Subroutine said: not called CC=3 SCAR=24.8
Pod documented
10 0 my ($self, $mess, $pri) = @_;
11  
12 0 my $body = $mess->{body};
13 0 my $who = $mess->{who};
14  
15 0 ▶ return unless ($pri == 2);
Branch: 1 branch
BranchTrueFalseTotal
unless $pri == 2 0 0 0
16  
17 0 ▶ return unless $body =~ /^summon\s+(.*?)\s*$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $body =~ /^summon\s+(.*?)\s*$/i 0 0 0
18 0 my $name = $1;
19
20 # TODO jabber stuff
21 0 return uc("$name ") x int(50 / (length($name)+1)) . "COME TO ME";
22 }
23  
24 0 ▶sub help {
Subroutine help: not called CC=1 SCAR=6.9
Pod documented
25 0 return "Commands: 'summon <name>'";
26 }
27  
28 1 1;
29  
30 =head1 NAME
31  
32 Bot::BasicBot::Pluggable::Module::Summon - summon someone on irc
33  
34 =head1 SYNOPSIS
35  
36 Summon someone to IRC
37  
38 =head1 IRC USAGE
39  
40 summon <name>
41  
42 =head1 AUTHOR
43  
44 Simon Wistow, <simon@thegestalt.org>
45  
46 =head1 COPYRIGHT
47  
48 Copyright 2005, Simon Wistow
49  
50 Distributed under the same terms as Perl itself.
51  
52 =head1 SEE ALSO
53  
54  
55 =cut
56  
« Zippy.pm ↑ Summary Magic8Ball.pm »