| 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
| |||||||||||||
| 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())
MC/DC100%1/1
$self ||= bless({}, shift())
$self
Truth table100%2/2
A
A= $self
| |||||||||||||
| 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__ | ||||||||||||