Remember/POE.pm

filter: Statementstmt 93.5% 29 / 31 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 6 / 6 totaltotal 91.6% 44 / 48 CC 2 SCAR 2.7
CC
2
Cov
91%
new_heap
2.0
brain
2.0
BEGIN
1.0
CRAP 1.3
« Remember/DBM.pm ↑ Summary Remember.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Data::Remember::POE;
5 {
6 1 $Data::Remember::POE::VERSION = '0.140490';
7 }
8 # ABSTRACT: a brain for Data::Remember linked to the POE session heap
9  
10 use Data::Remember::Util
11 1 ▶ init_brain => { -as => '_init_brain' };
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
15 1 my $class = shift;
16 1 my @config = @_;
17  
18 1 return bless { config => \@config }, $class;
19 }
20  
21  
22 10 ▶sub new_heap {
Subroutine new_heap: called CC=2 SCAR=7.0
Pod documented
23 10 my $self = shift;
24  
25 10 ▶ my @config = scalar(@_) ? @_ : @{ $self->{config} };
Branch: 1 branch
BranchTrueFalseTotal
scalar @_ ? : 0 10 10
26  
27 10 return _init_brain(@config);
28 }
29  
30  
31 70 ▶sub remember {
Subroutine remember: called CC=1 SCAR=0.0
Pod documented
32 70 my $self = shift;
33 70 my $que = shift;
34 70 my $fact = shift;
35  
36 70 return POE::Kernel->get_active_session->get_heap->remember($que, $fact);
37 }
38  
39  
40 70 ▶sub recall {
Subroutine recall: called CC=1 SCAR=0.0
Pod documented
41 70 my $self = shift;
42 70 my $que = shift;
43  
44 70 return POE::Kernel->get_active_session->get_heap->recall($que);
45 }
46  
47  
48 10 ▶sub forget {
Subroutine forget: called CC=1 SCAR=0.0
Pod documented
49 10 my $self = shift;
50 10 my $que = shift;
51  
52 10 return POE::Kernel->get_active_session->get_heap->forget($que);
53 }
54  
55  
56 0 ▶sub brain {
Subroutine brain: not called CC=1 SCAR=6.9
Pod documented
57 0 my $self = shift;
58  
59 0 return POE::Kernel->get_active_session->get_heap;
60 }
61  
62  
63 1 1;
64  
65 __END__
« Remember/DBM.pm ↑ Summary Remember.pm »