| 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
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||