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

filter: Statementstmt 52.4% 158 / 301 Branchbran 50.8% 59 / 116 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.1% 31 / 34 Podpod 6.4% 2 / 31 totaltotal 51.8% 250 / 482 SCAR 68.7
CC
89
Cov
52%
add
5.8
data
5.8
dead
5.8
CRAP 962.9
« blib/lib/Cache/Memcached/Managed.pm ↑ Summary testlib »
1 package Cache::Memcached::Managed::Multi;
2  
3 # Make sure we have version info for this module
4  
5 1 $VERSION= '0.25';
6  
7 BEGIN { # We're fooling the Kwalitee checker into thinking we're strict
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: not called CC=1 SCAR=0.0
9 }
10  
11 #--------------------------------------------------------------------------
12 # No, we're NOT using strict here. There are several reasons, the most
13 # important is that we're doing a lot of nasty stuff here.
14 # If you _do_ want stricture as a developer of this module, simply activate
15 # the line below here
16 #--------------------------------------------------------------------------
17 #use strict;
18  
19 # At compile time
20 # Create list with method names
21  
22 BEGIN {
23 1 ▶ my @method = qw(
Subroutine BEGIN: called CC=2 SCAR=9.0
24 add
25 data
26 dead
27 decr
28 delete
29 delete_group
30 delimiter
31 directory
32 errors
33 expiration
34 flush_all
35 flush_interval
36 get
37 get_group
38 get_multi
39 grab_group
40 group
41 group_names
42 inactive
43 incr
44 namespace
45 replace
46 reset
47 servers
48 set
49 start
50 stats
51 stop
52 version
53 );
54  
55 # Create a method for each of the methods which
56 # Obtains the list of objects
57 # If called in list context
58 # Call the methods in list context and return list of list refs
59 # Elseif called in scalar context
60 # Call the methods in scalar context and return list ref of values
61 # Call the methods in void context
62  
63 1 ▶ eval <<SUB foreach @method;
Subroutine add: called CC=4 SCAR=17.7
Subroutine data: called CC=4 SCAR=17.7
Subroutine dead: called CC=4 SCAR=17.7
Subroutine decr: called CC=4 SCAR=17.7
Subroutine delete: called CC=4 SCAR=17.7
Subroutine delete_group: called CC=4 SCAR=17.7
Subroutine delimiter: called CC=4 SCAR=17.7
Subroutine directory: called CC=4 SCAR=17.7
Subroutine errors: called CC=4 SCAR=17.7
Subroutine expiration: called CC=4 SCAR=17.7
Subroutine flush_all: called CC=4 SCAR=17.7
Subroutine flush_interval: called CC=4 SCAR=17.7
Subroutine get: called CC=4 SCAR=17.7
Subroutine get_group: called CC=4 SCAR=17.7
Subroutine get_multi: called CC=4 SCAR=17.7
Subroutine grab_group: called CC=4 SCAR=17.7
Subroutine group: called CC=4 SCAR=17.7
Subroutine group_names: called CC=4 SCAR=17.7
Subroutine inactive: not called CC=4 SCAR=17.7
Subroutine incr: called CC=4 SCAR=17.7
Subroutine namespace: called CC=4 SCAR=17.7
Subroutine replace: called CC=4 SCAR=17.7
Subroutine reset: called CC=4 SCAR=17.7
Subroutine servers: called CC=4 SCAR=17.7
Subroutine set: called CC=4 SCAR=17.7
Subroutine start: called CC=4 SCAR=17.7
Subroutine stats: called CC=4 SCAR=17.7
Subroutine stop: called CC=4 SCAR=17.7
Subroutine version: called CC=4 SCAR=17.7
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 58 branches
BranchTrueFalseTotal
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 1 1 2
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 1 1 2
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 0 0
elsif (defined wantarray) { } 0 0 0
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 1 1 2
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
if (wantarray) { } 0 1 1
elsif (defined wantarray) { } 1 0 1
64 sub $_ {
65 my \$objects = shift;
66 if (wantarray) {
67 return map { [\$_->$_( \@_ )] } \@{\$objects};
68 } elsif (defined wantarray) {
69 return [map { scalar \$_->$_( \@_ ) } \@{\$objects}];
70 }
71 \$_->$_( \@_ ) foreach \@{\$objects};
72 } #$_
73 SUB
74 } #BEGIN
75  
76 # Satisfy -require-
77  
78 1 1;
79  
80 #---------------------------------------------------------------------------
81 #
82 # Class methods
83 #
84 #---------------------------------------------------------------------------
85 # new
86 #
87 # Return instantiated object
88 #
89 # IN: 1 class
90 # 2..N list of Cache::Memcached::Managed (compatible) objects
91 # OUT: 1 instantiated object
92  
93 1 ▶sub new { my $class = shift; bless \@_,$class } #new
Subroutine new: called CC=1 SCAR=0.0
Pod documented
94  
95 #---------------------------------------------------------------------------
96 #
97 # Object methods
98 #
99 #---------------------------------------------------------------------------
100 # objects
101 #
102 # IN: 1 instantiated object
103 # OUT: 1..N objects of which this object consists
104  
105 0 ▶sub objects { @{$_[0]} } #objects
Subroutine objects: not called CC=1 SCAR=6.9
Pod documented
106  
107 #---------------------------------------------------------------------------
108  
109 __END__
« blib/lib/Cache/Memcached/Managed.pm ↑ Summary testlib »