Etcd/KV/Compare.pm

filter: Statementstmt 94.8% 37 / 39 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod n/a totaltotal 85.1% 46 / 54 SCAR 11.1
CC
3
Cov
86%
__ANON__
6.0
__ANON__
6.0
BEGIN
1.0
CRAP 3.0
« Etcd/Watch.pm ↑ Summary Etcd/Config.pm »
1 9 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Net::Etcd::KV::Compare;
3  
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 9 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use Types::Standard qw(Str Int Bool HashRef ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 ▶use MIME::Base64;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 9 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 9 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 9 with 'Net::Etcd::Role::Actions';
14  
15 9 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 =head1 NAME
18  
19 Net::Etcd::KV::Compare
20  
21 =cut
22  
23 9 our $VERSION = '0.020';
24  
25 =head1 DESCRIPTION
26  
27 Op
28  
29  
30 =head1 ACCESSORS
31  
32 =head2 result
33  
34 result is logical comparison operation for this comparison.
35  
36 =cut
37  
38 9 has result => (
39 is => 'ro',
40 );
41  
42 =head2 target
43  
44 target is the key-value field to inspect for the comparison.
45  
46 =cut
47  
48 9 has target => (
49 is => 'ro',
50 );
51  
52 =head2 key
53  
54 key is the subject key for the comparison operation.
55  
56 =cut
57  
58 has key => (
59 is => 'ro',
60 0 ▶ coerce => sub { return encode_base64( $_[0], '' ) if $_[0] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] 0 0 0
61 9 );
62  
63  
64 =head2 version
65  
66 version is the version of the given key
67  
68 =cut
69  
70 9 has version => (
71 is => 'ro',
72 );
73  
74 =head2 create_revision
75  
76 create_revision is the creation revision of the given key
77  
78 =cut
79  
80 9 has create_revision => (
81 is => 'ro',
82 );
83  
84 =head2 mod_revision
85  
86 mod_revision is the last modified revision of the given key.
87  
88 =cut
89  
90 9 has mod_revision => (
91 is => 'ro',
92 );
93  
94 =head2 value
95  
96 value is the value of the given key, in bytes.
97  
98 =cut
99  
100 has value => (
101 is => 'ro',
102 0 ▶ coerce => sub { return encode_base64( $_[0], '' ) if $_[0] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
if $_[0] 0 0 0
103 9 );
104  
105 9 1;
« Etcd/Watch.pm ↑ Summary Etcd/Config.pm »