line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
953403
|
use 5.006; # pragmas |
|
4
|
|
|
|
|
13
|
|
2
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
109
|
|
3
|
4
|
|
|
4
|
|
16
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
228
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package MooseX::Has::Sugar::Saccharin; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.000006'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Experimental sweetness |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
15
|
use Carp (); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
181
|
|
14
|
|
|
|
|
|
|
use Sub::Exporter::Progressive ( |
15
|
4
|
|
|
|
|
62
|
-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
|
|
|
4
|
|
1062
|
); |
|
4
|
|
|
|
|
2086
|
|
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
|
|
|
|
|
|
|
sub bare($) { |
50
|
1
|
|
|
1
|
1
|
106
|
return ( 'is', 'bare', 'isa', shift, ); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub ro($) { |
66
|
3
|
|
|
3
|
1
|
13060
|
return ( 'is', 'ro', 'isa', shift, ); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub rw($) { |
82
|
8
|
|
|
8
|
1
|
263
|
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
|
|
|
|
|
|
|
sub required(@) { |
109
|
7
|
|
|
7
|
1
|
46
|
return ( 'required', 1, @_ ); |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub lazy(@) { |
121
|
1
|
|
|
1
|
1
|
5
|
return ( 'lazy', 1, @_ ); |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub lazy_build(@) { |
133
|
2
|
|
|
2
|
1
|
9
|
return ( 'lazy_build', 1, @_ ); |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub weak_ref(@) { |
145
|
0
|
|
|
0
|
1
|
0
|
return ( 'weak_ref', 1, @_ ); |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub coerce(@) { |
161
|
0
|
|
|
0
|
1
|
0
|
return ( 'coerce', 1, @_ ); |
162
|
|
|
|
|
|
|
} |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
sub auto_deref(@) { |
173
|
0
|
|
|
0
|
1
|
0
|
return ( 'auto_deref', 1, @_ ); |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub builder($) { |
189
|
0
|
|
|
0
|
1
|
0
|
return ( 'builder', shift ); |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
sub predicate($) { |
201
|
0
|
|
|
0
|
1
|
0
|
return ( 'predicate', shift ); |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub clearer($) { |
213
|
0
|
|
|
0
|
1
|
0
|
return ( 'clearer', shift ); |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub init_arg($) { |
225
|
1
|
|
|
1
|
1
|
4
|
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
|
|
|
|
|
|
|
sub default(&) { |
245
|
3
|
|
|
3
|
1
|
5
|
my $code = shift; |
246
|
|
|
|
|
|
|
return ( |
247
|
|
|
|
|
|
|
'default', |
248
|
|
|
|
|
|
|
sub { |
249
|
2
|
|
|
2
|
|
68133
|
my $self = $_[0]; |
250
|
2
|
|
|
|
|
4
|
local $_ = $self; |
251
|
2
|
|
|
|
|
8
|
return $code->(); |
252
|
|
|
|
|
|
|
}, |
253
|
3
|
|
|
|
|
32
|
); |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub trigger(&) { |
265
|
0
|
|
|
0
|
1
|
|
my $code = shift; |
266
|
|
|
|
|
|
|
return ( |
267
|
|
|
|
|
|
|
'trigger', |
268
|
|
|
|
|
|
|
sub { |
269
|
0
|
|
|
0
|
|
|
my $self = $_[0]; |
270
|
0
|
|
|
|
|
|
local $_ = $self; |
271
|
0
|
|
|
|
|
|
return $code->(); |
272
|
|
|
|
|
|
|
}, |
273
|
0
|
|
|
|
|
|
); |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
1; |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
__END__ |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
=pod |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=encoding UTF-8 |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
=head1 NAME |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
MooseX::Has::Sugar::Saccharin - Experimental sweetness |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
=head1 VERSION |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
version 1.000006 |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=head1 SYNOPSIS |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
This is a highly experimental sugaring module. No Guarantees of stability. |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
use MooseX::Types::Moose qw( :all ); |
296
|
|
|
|
|
|
|
has name => rw Str, default { 1 }; |
297
|
|
|
|
|
|
|
has suffix => required rw Str; |
298
|
|
|
|
|
|
|
has 'suffix', required rw Str; |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
Your choice. |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=head1 EXPORT GROUPS |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=head2 C<:default> |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
exports: |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
=over 4 |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
L</ro>, L</rw>, L</required>, L</lazy>, L</lazy_build>, L</coerce>, L</weak_ref>, L</auto_deref>, |
311
|
|
|
|
|
|
|
L</bare>, L</default>, L</init_arg>, L</predicate>, L</clearer>, L</builder>, L</trigger> |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=back |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
=head1 EXPORTED FUNCTIONS |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=head2 C<bare> |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
=head2 C<bare> C<$Type> |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
bare Str |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
equivalent to this |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
is => 'bare', isa => Str |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=head2 C<ro> |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
=head2 C<ro> C<$Type> |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
ro Str |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
equivalent to this |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
is => 'ro', isa => Str, |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
=head2 C<rw> |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
=head2 C<rw> C<$Type> |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
rw Str |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
equivalent to this |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
is => 'rw', isa => Str |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=head2 C<required> |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
=head2 C<required @rest> |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
this |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
required rw Str |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
is equivalent to this |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
required => 1, is => 'rw', isa => Str, |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
this |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
rw Str, required |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
is equivalent to this |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
is => 'rw', isa => Str , required => 1 |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=head2 C<lazy> |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
=head2 C<lazy @rest> |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
like C<< ( lazy => 1 , @rest ) >> |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=head2 C<lazy_build> |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=head2 C<lazy_build @rest> |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
like C<< ( lazy_build => 1, @rest ) >> |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=head2 C<weak_ref> |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
=head2 C<weak_ref @rest> |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
like C<< ( weak_ref => 1, @rest ) >> |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
=head2 C<coerce> |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
=head2 C<coerce @rest> |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
like C<< ( coerce => 1, @rest ) >> |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
=head3 WARNING: |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
Conflicts with L<< C<MooseX::Types's> C<coerce> method|MooseX::Types/coerce >> |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=head2 C<auto_deref> |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=head2 C<auto_deref @rest> |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
like C<< ( auto_deref => 1, @rest ) >> |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=head2 C<builder> |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=head2 C<builder $buildername> |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
required rw Str, builder '_build_foo' |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
is like |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
builder => '_build_foo' |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=head2 C<predicate> |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head2 C<predicate $predicatename> |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
see L</builder> |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
=head2 C<clearer> |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=head2 C<clearer $clearername> |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
see L</builder> |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=head2 C<init_arg> |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
=head2 C<init_arg $argname> |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
see L</builder> |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
=head2 C<default> |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=head2 C<default { $code }> |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
Examples: |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
default { 1 } |
436
|
|
|
|
|
|
|
default { { } } |
437
|
|
|
|
|
|
|
default { [ ] } |
438
|
|
|
|
|
|
|
default { $_->otherfield } |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
$_ is localized as the same value as $_[0] for convenience ( usually $self ) |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head2 C<trigger> |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
=head2 C<trigger { $code }> |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
Works exactly like default. |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
=head1 CONFLICTS |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
=head2 MooseX::Has::Sugar |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
=head2 MooseX::Has::Sugar::Minimal |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
This module is not intended to be used in conjunction with |
455
|
|
|
|
|
|
|
L<::Sugar|MooseX::Has::Sugar> or L<::Sugar::Minimal|MooseX::Has::Sugar::Minimal> |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
We export many of the same symbols and its just not very sensible. |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
=head2 MooseX::Types |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
=head2 Moose::Util::TypeConstraints |
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
due to exporting the L</coerce> symbol, using us in the same scope as a call to |
464
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
use MooseX::Types .... |
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
or |
468
|
|
|
|
|
|
|
use Moose::Util::TypeConstraints |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
will result in a symbol collision. |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
We recommend using and creating proper type libraries instead, ( which will absolve you entirely of the need to use MooseX::Types and MooseX::Has::Sugar(::*)? in the same scope ) |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
=head2 Perl 5.010 feature 'switch' |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
the keyword 'default' becomes part of Perl in both these cases: |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
use 5.010; |
479
|
|
|
|
|
|
|
use feature qw( :switch ); |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
As such, we can't have that keyword in that scenario. |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
=head1 AUTHOR |
484
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>. |
490
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
492
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
=cut |