| 1 | # | ||||||||||||
| 2 | # This file is part of Jedi-Plugin-Session | ||||||||||||
| 3 | # | ||||||||||||
| 4 | # This software is copyright (c) 2013 by celogeek <me@celogeek.com>. | ||||||||||||
| 5 | # | ||||||||||||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 8 | # | ||||||||||||
| 9 | package Jedi::Plugin::Session; | ||||||||||||
| 10 | |||||||||||||
| 11 | # ABSTRACT: Session for Jedi | ||||||||||||
| 12 | |||||||||||||
| 13 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | |||||||||||||
| 16 | 2 | our $VERSION = '0.05'; # VERSION | |||||||||||
| 17 | |||||||||||||
| 18 | 2 | ▶ | use Import::Into; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | 2 | ▶ | use Module::Runtime qw/use_module/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 20 | |||||||||||||
| 21 | 2 | ▶ | use B::Hooks::EndOfScope; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 22 | |||||||||||||
| 23 | 2 | ▶ | sub import { | ||||||||||
|
Subroutine
import: called CC=2 SCAR=6.9
| |||||||||||||
| 24 | 2 | my ( undef, $backend ) = @_; | |||||||||||
| 25 | 2 | ▶ | $backend //= 'Memory'; | ||||||||||
|
Condition100%2/2
$backend //= "Memory"
MC/DC100%1/1
$backend //= "Memory"
$backend
Truth table100%2/2
A
A= $backend
| |||||||||||||
| 26 | 2 | my $target = caller; | |||||||||||
| 27 | 2 | ▶ | on_scope_end { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 28 | 2 | $target->can('with')->('Jedi::Plugin::Session::Role'); | |||||||||||
| 29 | 2 | $target->can('with')->( 'Jedi::Plugin::Session::Role::' . $backend ); | |||||||||||
| 30 | 2 | }; | |||||||||||
| 31 | 2 | return; | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 2 | 1; | |||||||||||
| 35 | |||||||||||||
| 36 | __END__ | ||||||||||||