File Coverage

blib/lib/Bot/Cobalt.pm
Criterion Covered Total %
statement 13 22 59.0
branch 0 4 0.0
condition n/a
subroutine 5 7 71.4
pod 2 2 100.0
total 20 35 57.1


line stmt bran cond sub pod time code
1             package Bot::Cobalt;
2             $Bot::Cobalt::VERSION = '0.021001';
3 8     8   628 use strictures 2;
  8         97  
  8         214  
4 8     8   958 use Carp;
  8         8  
  8         358  
5              
6 8     8   2003 use Import::Into;
  8         7989  
  8         142  
7              
8 8     8   2679 use Bot::Cobalt::Core::Sugar ();
  8         22  
  8         911  
9              
10             sub import {
11 43     43   334 Bot::Cobalt::Core::Sugar->import::into(scalar caller, @_[1 .. $#_])
12             }
13              
14             sub instance {
15 0     0 1   require Bot::Cobalt::Core;
16 0           shift;
17 0 0         if (@_) {
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 0         unless (Bot::Cobalt::Core->has_instance) {
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             sub new {
33 0     0 1   croak "Bot::Cobalt is a stub; it cannot be constructed.\n"
34             . "See the perldoc for Bot::Cobalt::Core";
35             }
36              
37             1;
38             __END__