Sugar/Saccharin.pm

filter: Statementstmt 72.5% 29 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 14 / 22 Podpod 100% 15 / 15 totaltotal 75.3% 58 / 77 CC 1 SCAR 3.1
CC
1
Cov
72%
weak_ref
2.0
coerce
2.0
auto_deref
2.0
CRAP 1.4
↑ Summary Sugar.pm »
1 4 ▶use 5.006; # pragmas
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package MooseX::Has::Sugar::Saccharin;
6  
7 4 our $VERSION = '1.000006';
8  
9 # ABSTRACT: Experimental sweetness
10  
11 4 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12  
13 4 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use Sub::Exporter::Progressive (
Subroutine BEGIN: called CC=1 SCAR=0.0
15 4 -setup => {
16 exports => [
17 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref',
18 'bare', 'default', 'init_arg', 'predicate', 'clearer', 'builder', 'trigger',
19 ],
20 groups => {
21 default => ['-all'],
22 },
23 },
24 4 );
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49 1 ▶sub bare($) {
Subroutine bare: called CC=1 SCAR=0.0
Pod documented
50 1 return ( 'is', 'bare', 'isa', shift, );
51 }
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65 3 ▶sub ro($) {
Subroutine ro: called CC=1 SCAR=0.0
Pod documented
66 3 return ( 'is', 'ro', 'isa', shift, );
67 }
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81 8 ▶sub rw($) {
Subroutine rw: called CC=1 SCAR=0.0
Pod documented
82 8 return ( 'is', 'rw', 'isa', shift, );
83 }
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108 7 ▶sub required(@) {
Subroutine required: called CC=1 SCAR=0.0
Pod documented
109 7 return ( 'required', 1, @_ );
110 }
111  
112  
113  
114  
115  
116  
117  
118  
119  
120 1 ▶sub lazy(@) {
Subroutine lazy: called CC=1 SCAR=0.0
Pod documented
121 1 return ( 'lazy', 1, @_ );
122 }
123  
124  
125  
126  
127  
128  
129  
130  
131  
132 2 ▶sub lazy_build(@) {
Subroutine lazy_build: called CC=1 SCAR=0.0
Pod documented
133 2 return ( 'lazy_build', 1, @_ );
134 }
135  
136  
137  
138  
139  
140  
141  
142  
143  
144 0 ▶sub weak_ref(@) {
Subroutine weak_ref: not called CC=1 SCAR=6.9
Pod documented
145 0 return ( 'weak_ref', 1, @_ );
146 }
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160 0 ▶sub coerce(@) {
Subroutine coerce: not called CC=1 SCAR=6.9
Pod documented
161 0 return ( 'coerce', 1, @_ );
162 }
163  
164  
165  
166  
167  
168  
169  
170  
171  
172 0 ▶sub auto_deref(@) {
Subroutine auto_deref: not called CC=1 SCAR=6.9
Pod documented
173 0 return ( 'auto_deref', 1, @_ );
174 }
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188 0 ▶sub builder($) {
Subroutine builder: not called CC=1 SCAR=6.9
Pod documented
189 0 return ( 'builder', shift );
190 }
191  
192  
193  
194  
195  
196  
197  
198  
199  
200 0 ▶sub predicate($) {
Subroutine predicate: not called CC=1 SCAR=6.9
Pod documented
201 0 return ( 'predicate', shift );
202 }
203  
204  
205  
206  
207  
208  
209  
210  
211  
212 0 ▶sub clearer($) {
Subroutine clearer: not called CC=1 SCAR=6.9
Pod documented
213 0 return ( 'clearer', shift );
214 }
215  
216  
217  
218  
219  
220  
221  
222  
223  
224 1 ▶sub init_arg($) {
Subroutine init_arg: called CC=1 SCAR=0.0
Pod documented
225 1 return ( 'init_arg', shift );
226 }
227  
228  
229  
230  
231  
232  
233  
234  
235  
236  
237  
238  
239  
240  
241  
242  
243 ## no critic (ProhibitBuiltinHomonyms)
244 3 ▶sub default(&) {
Subroutine default: called CC=1 SCAR=0.0
Pod documented
245 3 my $code = shift;
246 return (
247 'default',
248 2 ▶ sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
249 2 my $self = $_[0];
250 2 local $_ = $self;
251 2 return $code->();
252 },
253 3 );
254 }
255  
256  
257  
258  
259  
260  
261  
262  
263  
264 0 ▶sub trigger(&) {
Subroutine trigger: not called CC=1 SCAR=6.9
Pod documented
265 0 my $code = shift;
266 return (
267 'trigger',
268 0 ▶ sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
269 0 my $self = $_[0];
270 0 local $_ = $self;
271 0 return $code->();
272 },
273 0 );
274 }
275 4 1;
276  
277 __END__
↑ Summary Sugar.pm »