blib/lib/Cache/Memcached/Managed/Inactive.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 2 totaltotal 82.7% 24 / 29 SCAR 17.9
CC
6
Cov
94%
BEGIN
4.0
__ANON__
2.0
new
2.0
CRAP 6.0
« testlib ↑ Summary
1 package Cache::Memcached::Managed::Inactive;
2  
3 # Make sure we have version info for this module
4  
5 3 $VERSION= '0.25';
6  
7 #--------------------------------------------------------------------------
8 BEGIN { # We're fooling the Kwalitee checker into thinking we're strict
9 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: not called CC=1 SCAR=0.0
10 }
11  
12 #--------------------------------------------------------------------------
13 # No, we're NOT using strict here. There are several reasons, the most
14 # important is that we're doing a lot of nasty stuff here.
15 # If you _do_ want stricture as a developer of this module, simply activate
16 # the line below here
17 #--------------------------------------------------------------------------
18 #use strict;
19  
20 # Singleton object
21  
22 3 my $self;
23  
24 # At compile time
25 # Create accessors returning undef
26  
27 BEGIN {
28 3 ▶ *$_ = sub { undef } foreach qw(
Subroutine BEGIN: called CC=4 SCAR=13.9
Subroutine __ANON__: called CC=1 SCAR=0.0
29 add
30 data
31 decr
32 delete
33 delete_group
34 delimiter
35 directory
36 expiration
37 flush_all
38 flush_interval
39 get
40 incr
41 namespace
42 replace
43 reset
44 set
45 start
46 stop
47 );
48  
49 # Create accessors returning hash ref
50  
51 3 ▶ *$_ = sub { {} } foreach qw(
Subroutine __ANON__: called CC=1 SCAR=0.0
52 errors
53 get_group
54 get_multi
55 grab_group
56 group
57 stats
58 version
59 );
60  
61 # Create accessors returning list or hash ref
62  
63 3 ▶ *$_ = sub { wantarray ? () : {} } foreach qw(
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 15 15 30
64 dead
65 group_names
66 servers
67 );
68 } #BEGIN
69  
70 # Satisfy -require-
71  
72 3 1;
73  
74 #---------------------------------------------------------------------------
75 #
76 # Class methods
77 #
78 #---------------------------------------------------------------------------
79 # new
80 #
81 # Return instantiated object
82 #
83 # IN: 1 class
84 # 2..N hash with parameters
85 # OUT: 1 instantiated object
86  
87 5 ▶sub new { $self ||= bless {},shift } #new
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
Condition100%2/2
$self ||= bless({}, shift())
l!l
32
MC/DC100%1/1
$self ||= bless({}, shift())
$self
Truth table100%2/2
A
A= $self
Aresult
11
00
88  
89 #---------------------------------------------------------------------------
90 #
91 # Object methods
92 #
93 #---------------------------------------------------------------------------
94 # inactive
95 #
96 # IN: 1 instantiated object
97 # OUT: 1 true
98  
99 0 ▶sub inactive { 1 } #inactive
Subroutine inactive: not called CC=1 SCAR=6.9
Pod undocumented
100  
101 #---------------------------------------------------------------------------
102  
103 __END__
« testlib ↑ Summary