blib/lib/Bot/Cobalt.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 59.4% 22 / 37 CC 3 SCAR 15.6
CC
3
Cov
54%
instance
12.0
new
2.0
BEGIN
1.0
CRAP 4.8
« blib/lib/Bot/Cobalt/IRC/Message.pm ↑ Summary blib/lib/Bot/Cobalt/Plugin/Extras/Debug.pm »
1 package Bot::Cobalt;
2 6 $Bot::Cobalt::VERSION = '0.021003';
3 6 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use Import::Into;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶use Bot::Cobalt::Core::Sugar ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 23 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
11 23 Bot::Cobalt::Core::Sugar->import::into(scalar caller, @_[1 .. $#_])
12 }
13  
14 0 ▶sub instance {
Subroutine instance: not called CC=3 SCAR=24.8
Pod documented
15 0 require Bot::Cobalt::Core;
16 0 shift;
17 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
18 ## Someone tried to create a fresh instance, but they really
19 ## wanted a Bot::Cobalt::Core.
20 ## Behavior may change.
21 0 return Bot::Cobalt::Core->instance(@_)
22 }
23  
24 0 ▶ unless (Bot::Cobalt::Core->has_instance) {
Branch: 1 branch
BranchTrueFalseTotal
unless ("Bot::Cobalt::Core"->has_instance) 0 0 0
25 0 carp "Tried to retrieve instance but no active Bot::Cobalt::Core found";
26 return
27 0 }
28  
29 Bot::Cobalt::Core->instance
30 0 }
31  
32 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
33 0 croak "Bot::Cobalt is a stub; it cannot be constructed.\n"
34 . "See the perldoc for Bot::Cobalt::Core";
35 }
36  
37 6 1;
38 __END__
« blib/lib/Bot/Cobalt/IRC/Message.pm ↑ Summary blib/lib/Bot/Cobalt/Plugin/Extras/Debug.pm »