| line |
true |
false |
branch |
|
170
|
3293 |
1048 |
if (len == 3 && strEQ(type_str, "Str")) return TYPE_STR; |
|
|
3140 |
153 |
if (len == 3 && strEQ(type_str, "Str")) return TYPE_STR; |
|
171
|
153 |
1048 |
if (len == 3 && strEQ(type_str, "Int")) return TYPE_INT; |
|
|
83 |
70 |
if (len == 3 && strEQ(type_str, "Int")) return TYPE_INT; |
|
172
|
70 |
1048 |
if (len == 3 && strEQ(type_str, "Num")) return TYPE_NUM; |
|
|
13 |
57 |
if (len == 3 && strEQ(type_str, "Num")) return TYPE_NUM; |
|
173
|
57 |
1048 |
if (len == 3 && strEQ(type_str, "Any")) return TYPE_ANY; |
|
|
57 |
0 |
if (len == 3 && strEQ(type_str, "Any")) return TYPE_ANY; |
|
174
|
5 |
1043 |
if (len == 4 && strEQ(type_str, "Bool")) return TYPE_BOOL; |
|
|
5 |
0 |
if (len == 4 && strEQ(type_str, "Bool")) return TYPE_BOOL; |
|
175
|
8 |
1035 |
if (len == 6 && strEQ(type_str, "Object")) return TYPE_OBJECT; |
|
|
7 |
1 |
if (len == 6 && strEQ(type_str, "Object")) return TYPE_OBJECT; |
|
176
|
7 |
1029 |
if (len == 7 && strEQ(type_str, "Defined")) return TYPE_DEFINED; |
|
|
1 |
6 |
if (len == 7 && strEQ(type_str, "Defined")) return TYPE_DEFINED; |
|
177
|
6 |
1029 |
if (len == 7 && strEQ(type_str, "CodeRef")) return TYPE_CODEREF; |
|
|
1 |
5 |
if (len == 7 && strEQ(type_str, "CodeRef")) return TYPE_CODEREF; |
|
178
|
5 |
1029 |
if (len == 7 && strEQ(type_str, "HashRef")) return TYPE_HASHREF; |
|
|
5 |
0 |
if (len == 7 && strEQ(type_str, "HashRef")) return TYPE_HASHREF; |
|
179
|
14 |
1015 |
if (len == 8 && strEQ(type_str, "ArrayRef")) return TYPE_ARRAYREF; |
|
|
14 |
0 |
if (len == 8 && strEQ(type_str, "ArrayRef")) return TYPE_ARRAYREF; |
|
190
|
2 |
3 |
return SvOK(val) || SvIOK(val) || SvNOK(val) || SvPOK(val); |
|
|
2 |
0 |
return SvOK(val) || SvIOK(val) || SvNOK(val) || SvPOK(val); |
|
|
2 |
0 |
return SvOK(val) || SvIOK(val) || SvNOK(val) || SvPOK(val); |
|
|
0 |
2 |
return SvOK(val) || SvIOK(val) || SvNOK(val) || SvPOK(val); |
|
192
|
15627 |
3 |
return SvOK(val) && !SvROK(val); /* defined non-ref */ |
|
|
15622 |
5 |
return SvOK(val) && !SvROK(val); /* defined non-ref */ |
|
194
|
10922 |
15 |
if (SvIOK(val)) return true; |
|
195
|
14 |
1 |
if (SvPOK(val)) { |
|
200
|
0 |
14 |
if (len == 0) return false; |
|
203
|
14 |
0 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
|
3 |
11 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
|
3 |
0 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
207
|
3222 |
2 |
if (SvNIOK(val)) return true; |
|
208
|
2 |
0 |
if (SvPOK(val)) { |
|
213
|
0 |
2 |
if (len == 0) return false; |
|
216
|
2 |
0 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
|
1 |
1 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
|
1 |
0 |
return errno == 0 && endp == pv + len && *pv != '\0'; |
|
221
|
5 |
3 |
if (SvIOK(val)) { |
|
223
|
3 |
2 |
return iv == 0 || iv == 1; |
|
|
2 |
1 |
return iv == 0 || iv == 1; |
|
225
|
1 |
2 |
return SvTRUE(val) || !SvOK(val) || (SvPOK(val) && SvCUR(val) == 0); |
|
|
1 |
0 |
return SvTRUE(val) || !SvOK(val) || (SvPOK(val) && SvCUR(val) == 0); |
|
|
1 |
0 |
return SvTRUE(val) || !SvOK(val) || (SvPOK(val) && SvCUR(val) == 0); |
|
|
1 |
0 |
return SvTRUE(val) || !SvOK(val) || (SvPOK(val) && SvCUR(val) == 0); |
|
227
|
11091 |
0 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVAV; |
|
|
11090 |
1 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVAV; |
|
229
|
2006 |
0 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVHV; |
|
|
2005 |
1 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVHV; |
|
231
|
1 |
1 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVCV; |
|
|
1 |
0 |
return SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVCV; |
|
233
|
9 |
1 |
return SvROK(val) && sv_isobject(val); |
|
|
7 |
2 |
return SvROK(val) && sv_isobject(val); |
|
260
|
0 |
17 |
if (spec->has_coerce && spec->coerce_cb) { |
|
|
0 |
0 |
if (spec->has_coerce && spec->coerce_cb) { |
|
262
|
0 |
0 |
PUSHMARK(SP); |
|
263
|
0 |
0 |
XPUSHs(val); |
|
271
|
17 |
0 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->coerce) { |
|
|
17 |
0 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->coerce) { |
|
|
0 |
17 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->coerce) { |
|
275
|
17 |
0 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->perl_coerce) { |
|
|
17 |
0 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->perl_coerce) { |
|
|
4 |
13 |
if (spec->type_id == TYPE_CUSTOM && spec->registered && spec->registered->perl_coerce) { |
|
277
|
0 |
4 |
PUSHMARK(SP); |
|
278
|
0 |
4 |
XPUSHs(val); |
|
290
|
42996 |
0 |
if (!spec || !spec->has_type) return true; |
|
|
0 |
42996 |
if (!spec || !spec->has_type) return true; |
|
292
|
42979 |
17 |
if (spec->type_id != TYPE_CUSTOM) { |
|
296
|
0 |
17 |
if (!spec->registered) return true; |
|
299
|
0 |
17 |
if (spec->registered->check) { |
|
304
|
17 |
0 |
if (spec->registered->perl_check) { |
|
311
|
0 |
17 |
PUSHMARK(SP); |
|
312
|
0 |
17 |
XPUSHs(val); |
|
316
|
17 |
0 |
if (count > 0) { |
|
321
|
17 |
0 |
FREETMPS; |
|
344
|
2848 |
152 |
while (p < end && *p != ':') p++; |
|
|
2505 |
343 |
while (p < end && *p != ':') p++; |
|
353
|
560 |
495 |
while (p < end) { |
|
361
|
560 |
0 |
if (*p == ':') p++; /* Skip separator */ |
|
362
|
0 |
560 |
if (p >= end) break; |
|
367
|
3059 |
224 |
while (p < end && *p != ':' && *p != '(') p++; |
|
|
2863 |
196 |
while (p < end && *p != ':' && *p != '(') p++; |
|
|
2723 |
140 |
while (p < end && *p != ':' && *p != '(') p++; |
|
371
|
336 |
224 |
if (p < end && *p == '(') { |
|
|
140 |
196 |
if (p < end && *p == '(') { |
|
376
|
974 |
119 |
while (p < end && paren_depth > 0) { |
|
|
953 |
21 |
while (p < end && paren_depth > 0) { |
|
377
|
0 |
953 |
if (*p == '(') paren_depth++; |
|
378
|
140 |
813 |
else if (*p == ')') paren_depth--; |
|
384
|
107 |
33 |
if (mod_len == 7 && strncmp(mod_start, "default", 7) == 0) { |
|
|
80 |
27 |
if (mod_len == 7 && strncmp(mod_start, "default", 7) == 0) { |
|
389
|
80 |
0 |
if (arg_len > 0) { |
|
396
|
79 |
1 |
if (arg_copy[0] >= '0' && arg_copy[0] <= '9') { |
|
|
48 |
31 |
if (arg_copy[0] >= '0' && arg_copy[0] <= '9') { |
|
397
|
4 |
44 |
if (strchr(arg_copy, '.')) { |
|
402
|
0 |
32 |
} else if (arg_copy[0] == '-' && arg_len > 1) { |
|
|
0 |
0 |
} else if (arg_copy[0] == '-' && arg_len > 1) { |
|
403
|
0 |
0 |
if (strchr(arg_copy, '.')) { |
|
408
|
32 |
0 |
} else if (arg_copy[0] == '\'' || arg_copy[0] == '"') { |
|
|
1 |
31 |
} else if (arg_copy[0] == '\'' || arg_copy[0] == '"') { |
|
410
|
1 |
0 |
if (arg_len >= 2) { |
|
415
|
1 |
30 |
} else if (strncmp(arg_copy, "undef", 5) == 0) { |
|
417
|
6 |
24 |
} else if (strncmp(arg_copy, "[]", 2) == 0) { |
|
419
|
2 |
22 |
} else if (strncmp(arg_copy, "{}", 2) == 0) { |
|
427
|
27 |
33 |
} else if (mod_len == 7 && strncmp(mod_start, "trigger", 7) == 0) { |
|
|
4 |
23 |
} else if (mod_len == 7 && strncmp(mod_start, "trigger", 7) == 0) { |
|
432
|
4 |
0 |
if (arg_len > 0) { |
|
441
|
21 |
35 |
} else if (mod_len == 6 && strncmp(mod_start, "coerce", 6) == 0) { |
|
|
0 |
21 |
} else if (mod_len == 6 && strncmp(mod_start, "coerce", 6) == 0) { |
|
444
|
0 |
0 |
if (arg_len > 0) { |
|
452
|
23 |
33 |
} else if (mod_len == 7 && strncmp(mod_start, "builder", 7) == 0) { |
|
|
20 |
3 |
} else if (mod_len == 7 && strncmp(mod_start, "builder", 7) == 0) { |
|
455
|
18 |
2 |
if (arg_len > 0) { |
|
468
|
3 |
33 |
} else if (mod_len == 7 && strncmp(mod_start, "clearer", 7) == 0) { |
|
|
3 |
0 |
} else if (mod_len == 7 && strncmp(mod_start, "clearer", 7) == 0) { |
|
471
|
3 |
0 |
if (arg_len > 0) { |
|
479
|
3 |
30 |
} else if (mod_len == 9 && strncmp(mod_start, "predicate", 9) == 0) { |
|
|
3 |
0 |
} else if (mod_len == 9 && strncmp(mod_start, "predicate", 9) == 0) { |
|
482
|
3 |
0 |
if (arg_len > 0) { |
|
490
|
21 |
9 |
} else if (mod_len == 6 && strncmp(mod_start, "reader", 6) == 0) { |
|
|
10 |
11 |
} else if (mod_len == 6 && strncmp(mod_start, "reader", 6) == 0) { |
|
492
|
10 |
0 |
if (arg_len > 0) { |
|
500
|
11 |
9 |
} else if (mod_len == 6 && strncmp(mod_start, "writer", 6) == 0) { |
|
|
11 |
0 |
} else if (mod_len == 6 && strncmp(mod_start, "writer", 6) == 0) { |
|
502
|
11 |
0 |
if (arg_len > 0) { |
|
510
|
9 |
0 |
} else if (mod_len == 3 && strncmp(mod_start, "arg", 3) == 0) { |
|
|
9 |
0 |
} else if (mod_len == 3 && strncmp(mod_start, "arg", 3) == 0) { |
|
512
|
9 |
0 |
if (arg_len > 0) { |
|
523
|
61 |
359 |
if (mod_len == 8 && strncmp(mod_start, "required", 8) == 0) { |
|
|
34 |
27 |
if (mod_len == 8 && strncmp(mod_start, "required", 8) == 0) { |
|
525
|
27 |
359 |
} else if (mod_len == 8 && strncmp(mod_start, "readonly", 8) == 0) { |
|
|
13 |
14 |
} else if (mod_len == 8 && strncmp(mod_start, "readonly", 8) == 0) { |
|
527
|
26 |
347 |
} else if (mod_len == 4 && strncmp(mod_start, "lazy", 4) == 0) { |
|
|
14 |
12 |
} else if (mod_len == 4 && strncmp(mod_start, "lazy", 4) == 0) { |
|
529
|
12 |
347 |
} else if (mod_len == 4 && strncmp(mod_start, "weak", 4) == 0) { |
|
|
7 |
5 |
} else if (mod_len == 4 && strncmp(mod_start, "weak", 4) == 0) { |
|
531
|
18 |
334 |
} else if (mod_len == 7 && strncmp(mod_start, "clearer", 7) == 0) { |
|
|
11 |
7 |
} else if (mod_len == 7 && strncmp(mod_start, "clearer", 7) == 0) { |
|
534
|
10 |
331 |
} else if (mod_len == 9 && strncmp(mod_start, "predicate", 9) == 0) { |
|
|
10 |
0 |
} else if (mod_len == 9 && strncmp(mod_start, "predicate", 9) == 0) { |
|
547
|
323 |
8 |
if (type_id != TYPE_NONE) { |
|
552
|
8 |
0 |
if (g_type_registry) { |
|
554
|
7 |
1 |
if (svp) { |
|
592
|
0 |
43220 |
if (!SvROK(obj)) return NULL; |
|
594
|
6225 |
36995 |
while (mg) { |
|
595
|
6225 |
0 |
if (mg->mg_virtual == &object_magic_vtbl) return mg; |
|
639
|
47 |
19 |
if (src->default_sv) dst->default_sv = SvREFCNT_inc(src->default_sv); |
|
640
|
0 |
66 |
if (src->trigger_cb) dst->trigger_cb = SvREFCNT_inc(src->trigger_cb); |
|
641
|
0 |
66 |
if (src->coerce_cb) dst->coerce_cb = SvREFCNT_inc(src->coerce_cb); |
|
642
|
1 |
65 |
if (src->builder_name) dst->builder_name = SvREFCNT_inc(src->builder_name); |
|
643
|
0 |
66 |
if (src->clearer_name) dst->clearer_name = SvREFCNT_inc(src->clearer_name); |
|
644
|
0 |
66 |
if (src->predicate_name) dst->predicate_name = SvREFCNT_inc(src->predicate_name); |
|
645
|
1 |
65 |
if (src->reader_name) dst->reader_name = SvREFCNT_inc(src->reader_name); |
|
646
|
1 |
65 |
if (src->writer_name) dst->writer_name = SvREFCNT_inc(src->writer_name); |
|
647
|
1 |
65 |
if (src->init_arg) dst->init_arg = SvREFCNT_inc(src->init_arg); |
|
660
|
0 |
11 |
if (override->has_type) { |
|
667
|
9 |
2 |
if (override->has_default) { |
|
668
|
8 |
1 |
if (merged->default_sv) SvREFCNT_dec(merged->default_sv); |
|
669
|
9 |
0 |
merged->default_sv = override->default_sv ? SvREFCNT_inc(override->default_sv) : NULL; |
|
674
|
1 |
10 |
if (override->has_trigger) { |
|
675
|
0 |
1 |
if (merged->trigger_cb) SvREFCNT_dec(merged->trigger_cb); |
|
676
|
1 |
0 |
merged->trigger_cb = override->trigger_cb ? SvREFCNT_inc(override->trigger_cb) : NULL; |
|
681
|
0 |
11 |
if (override->has_coerce) { |
|
682
|
0 |
0 |
if (merged->coerce_cb) SvREFCNT_dec(merged->coerce_cb); |
|
683
|
0 |
0 |
merged->coerce_cb = override->coerce_cb ? SvREFCNT_inc(override->coerce_cb) : NULL; |
|
688
|
1 |
10 |
if (override->has_builder) { |
|
689
|
0 |
1 |
if (merged->builder_name) SvREFCNT_dec(merged->builder_name); |
|
690
|
1 |
0 |
merged->builder_name = override->builder_name ? SvREFCNT_inc(override->builder_name) : NULL; |
|
695
|
0 |
11 |
if (override->is_required) merged->is_required = 1; |
|
696
|
1 |
10 |
if (override->is_readonly) merged->is_readonly = 1; |
|
697
|
0 |
11 |
if (override->is_lazy) merged->is_lazy = 1; |
|
698
|
0 |
11 |
if (override->is_weak) merged->is_weak = 1; |
|
701
|
0 |
11 |
if (override->has_clearer) { |
|
703
|
0 |
0 |
if (override->clearer_name) { |
|
704
|
0 |
0 |
if (merged->clearer_name) SvREFCNT_dec(merged->clearer_name); |
|
708
|
0 |
11 |
if (override->has_predicate) { |
|
710
|
0 |
0 |
if (override->predicate_name) { |
|
711
|
0 |
0 |
if (merged->predicate_name) SvREFCNT_dec(merged->predicate_name); |
|
717
|
0 |
11 |
if (override->reader_name) { |
|
718
|
0 |
0 |
if (merged->reader_name) SvREFCNT_dec(merged->reader_name); |
|
721
|
0 |
11 |
if (override->writer_name) { |
|
722
|
0 |
0 |
if (merged->writer_name) SvREFCNT_dec(merged->writer_name); |
|
725
|
0 |
11 |
if (override->init_arg) { |
|
726
|
0 |
0 |
if (merged->init_arg) SvREFCNT_dec(merged->init_arg); |
|
753
|
0 |
27824 |
if (!g_class_registry) return NULL; |
|
755
|
21569 |
6255 |
if (svp && SvIOK(*svp)) { |
|
|
21569 |
0 |
if (svp && SvIOK(*svp)) { |
|
762
|
0 |
249 |
if (!g_class_registry) { |
|
793
|
0 |
0 |
if (is_named) { |
|
795
|
0 |
0 |
if (!meta->has_any_types && !meta->has_any_defaults && !meta->has_any_required) { |
|
|
0 |
0 |
if (!meta->has_any_types && !meta->has_any_defaults && !meta->has_any_required) { |
|
|
0 |
0 |
if (!meta->has_any_types && !meta->has_any_defaults && !meta->has_any_required) { |
|
798
|
0 |
0 |
Zero(&ary[1], slot_count - 1, SV*); |
|
800
|
0 |
0 |
for (i = 0; i < items; i += 2) { |
|
802
|
0 |
0 |
SV *val_sv = (i + 1 < items) ? MARK[i + 2] : &PL_sv_undef; |
|
806
|
0 |
0 |
if (idx_svp) { |
|
813
|
0 |
0 |
for (i = 1; i < slot_count; i++) { |
|
814
|
0 |
0 |
if (!ary[i]) ary[i] = newSV(0); |
|
819
|
0 |
0 |
Zero(&ary[1], slot_count - 1, SV*); |
|
821
|
0 |
0 |
for (i = 0; i < items; i += 2) { |
|
823
|
0 |
0 |
SV *val_sv = (i + 1 < items) ? MARK[i + 2] : &PL_sv_undef; |
|
827
|
0 |
0 |
if (idx_svp) { |
|
830
|
0 |
0 |
if (meta->has_any_types && meta->slots[idx] && meta->slots[idx]->has_type) { |
|
|
0 |
0 |
if (meta->has_any_types && meta->slots[idx] && meta->slots[idx]->has_type) { |
|
|
0 |
0 |
if (meta->has_any_types && meta->slots[idx] && meta->slots[idx]->has_type) { |
|
832
|
0 |
0 |
if (spec->type_id != TYPE_CUSTOM) { |
|
833
|
0 |
0 |
if (!check_builtin_type(aTHX_ val_sv, spec->type_id)) { |
|
837
|
0 |
0 |
} else if (spec->registered && spec->registered->check) { |
|
|
0 |
0 |
} else if (spec->registered && spec->registered->check) { |
|
838
|
0 |
0 |
if (!spec->registered->check(aTHX_ val_sv)) { |
|
849
|
0 |
0 |
for (i = 1; i < slot_count; i++) { |
|
850
|
0 |
0 |
if (!ary[i] || !SvOK(ary[i])) { |
|
|
0 |
0 |
if (!ary[i] || !SvOK(ary[i])) { |
|
853
|
0 |
0 |
if (spec && spec->is_required) { |
|
|
0 |
0 |
if (spec && spec->is_required) { |
|
857
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
858
|
0 |
0 |
if (SvROK(spec->default_sv)) { |
|
859
|
0 |
0 |
if (ary[i]) SvREFCNT_dec(ary[i]); |
|
860
|
0 |
0 |
if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVAV) { |
|
862
|
0 |
0 |
} else if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVHV) { |
|
868
|
0 |
0 |
if (ary[i]) { sv_setsv(ary[i], spec->default_sv); } |
|
871
|
0 |
0 |
} else if (!ary[i]) { |
|
880
|
0 |
0 |
if (provided > slot_count - 1) provided = slot_count - 1; |
|
882
|
0 |
0 |
if (!meta->has_any_types) { |
|
883
|
0 |
0 |
for (i = 0; i < provided; i++) { |
|
887
|
0 |
0 |
for (i = 0; i < provided; i++) { |
|
891
|
0 |
0 |
if (meta->slots[idx] && meta->slots[idx]->has_type) { |
|
|
0 |
0 |
if (meta->slots[idx] && meta->slots[idx]->has_type) { |
|
893
|
0 |
0 |
if (spec->type_id != TYPE_CUSTOM) { |
|
894
|
0 |
0 |
if (!check_builtin_type(aTHX_ val_sv, spec->type_id)) { |
|
898
|
0 |
0 |
} else if (spec->registered && spec->registered->check) { |
|
|
0 |
0 |
} else if (spec->registered && spec->registered->check) { |
|
899
|
0 |
0 |
if (!spec->registered->check(aTHX_ val_sv)) { |
|
910
|
0 |
0 |
for (i = provided + 1; i < slot_count; i++) { |
|
915
|
0 |
0 |
if (meta->has_any_defaults || meta->has_any_required) { |
|
|
0 |
0 |
if (meta->has_any_defaults || meta->has_any_required) { |
|
916
|
0 |
0 |
for (i = 1; i < slot_count; i++) { |
|
917
|
0 |
0 |
if (!SvOK(ary[i])) { |
|
920
|
0 |
0 |
if (spec && spec->is_required) { |
|
|
0 |
0 |
if (spec && spec->is_required) { |
|
924
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
0 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
925
|
0 |
0 |
if (SvROK(spec->default_sv)) { |
|
926
|
0 |
0 |
if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVAV) { |
|
929
|
0 |
0 |
} else if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVHV) { |
|
949
|
0 |
0 |
if (meta->has_any_builders) { |
|
950
|
0 |
0 |
for (i = 1; i < slot_count; i++) { |
|
952
|
0 |
0 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
0 |
0 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
0 |
0 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
0 |
0 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
958
|
0 |
0 |
PUSHMARK(SP); |
|
959
|
0 |
0 |
XPUSHs(obj_sv); |
|
963
|
0 |
0 |
if (count > 0) { |
|
967
|
0 |
0 |
if (spec->has_type) { |
|
968
|
0 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
0 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
970
|
0 |
0 |
if (!check_slot_type(aTHX_ built_val, spec)) { |
|
971
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
973
|
0 |
0 |
: type_id_to_name(spec->type_id); |
|
982
|
0 |
0 |
FREETMPS; |
|
989
|
0 |
0 |
if (meta->has_any_weak) { |
|
990
|
0 |
0 |
for (i = 1; i < slot_count; i++) { |
|
992
|
0 |
0 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
|
0 |
0 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
|
0 |
0 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
1000
|
0 |
0 |
if (meta->has_build == 0) { |
|
1002
|
0 |
0 |
if (gv && GvCV(gv)) { |
|
|
0 |
0 |
if (gv && GvCV(gv)) { |
|
1009
|
0 |
0 |
if (meta->has_build == 1) { |
|
1013
|
0 |
0 |
PUSHMARK(SP); |
|
1014
|
0 |
0 |
XPUSHs(obj_sv); |
|
1017
|
0 |
0 |
FREETMPS; |
|
1022
|
0 |
0 |
XPUSHs(obj_sv); |
|
1042
|
49639 |
0 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
|
49639 |
0 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
1044
|
35 |
49638 |
for (i = 0; i < depth; i++) { |
|
1045
|
1 |
34 |
if (visited[i] == av) { |
|
1053
|
49638 |
0 |
if (idx <= AvFILLp(av)) { |
|
1055
|
49638 |
0 |
if (slot && SvOK(slot)) return slot; |
|
|
41778 |
7860 |
if (slot && SvOK(slot)) return slot; |
|
1059
|
0 |
7860 |
if (AvFILLp(av) < 0) break; |
|
1062
|
7860 |
0 |
if (!proto_sv || !SvROK(proto_sv) || SvTYPE(SvRV(proto_sv)) != SVt_PVAV) break; |
|
|
26 |
7834 |
if (!proto_sv || !SvROK(proto_sv) || SvTYPE(SvRV(proto_sv)) != SVt_PVAV) break; |
|
|
26 |
0 |
if (!proto_sv || !SvROK(proto_sv) || SvTYPE(SvRV(proto_sv)) != SVt_PVAV) break; |
|
1068
|
0 |
7834 |
if (depth >= MAX_PROTOTYPE_DEPTH) { |
|
1086
|
80144 |
0 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
|
0 |
80144 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
1093
|
80144 |
0 |
if (idx <= AvFILLp(av)) { |
|
1095
|
80144 |
0 |
if (sv && SvOK(sv)) { |
|
|
80144 |
0 |
if (sv && SvOK(sv)) { |
|
1105
|
0 |
0 |
if (proto_sv && SvROK(proto_sv) && SvTYPE(SvRV(proto_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (proto_sv && SvROK(proto_sv) && SvTYPE(SvRV(proto_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (proto_sv && SvROK(proto_sv) && SvTYPE(SvRV(proto_sv)) == SVt_PVAV) { |
|
1129
|
35 |
0 |
if (!SvROK(obj) || SvTYPE(rv) != SVt_PVAV) { |
|
|
0 |
35 |
if (!SvROK(obj) || SvTYPE(rv) != SVt_PVAV) { |
|
1136
|
0 |
35 |
if (SvMAGICAL(rv)) { |
|
1138
|
0 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
0 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
1144
|
35 |
0 |
if (idx <= AvFILLp(av)) { |
|
1146
|
35 |
0 |
if (slot) { |
|
1178
|
6 |
49 |
if (g_func_accessor_count >= g_func_accessor_capacity) { |
|
1179
|
0 |
6 |
IV new_capacity = g_func_accessor_capacity ? g_func_accessor_capacity * 2 : 64; |
|
1180
|
0 |
6 |
Renew(g_func_accessor_registry, new_capacity, FuncAccessorData*); |
|
1203
|
8086 |
0 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
|
0 |
8086 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
1210
|
0 |
8086 |
if (SvMAGICAL(av)) { |
|
1212
|
0 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
0 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
1218
|
0 |
8086 |
if (spec->has_checks) { |
|
1219
|
0 |
0 |
if (spec->is_readonly) { |
|
1222
|
0 |
0 |
if (spec->is_required && !SvOK(val)) { |
|
|
0 |
0 |
if (spec->is_required && !SvOK(val)) { |
|
1225
|
0 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) { |
|
|
0 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) { |
|
1231
|
8086 |
0 |
if (spec->has_type) { |
|
1232
|
0 |
8086 |
if (!check_slot_type(aTHX_ val, spec)) { |
|
1233
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
1235
|
0 |
0 |
: type_id_to_name(spec->type_id); |
|
1242
|
0 |
8086 |
if (spec->has_trigger && spec->trigger_cb) { |
|
|
0 |
0 |
if (spec->has_trigger && spec->trigger_cb) { |
|
1244
|
0 |
0 |
PUSHMARK(SP); |
|
1245
|
0 |
0 |
XPUSHs(obj); |
|
1246
|
0 |
0 |
XPUSHs(val); |
|
1251
|
8086 |
0 |
if (!spec->is_weak) { |
|
1253
|
8086 |
0 |
if (idx <= AvFILLp(av)) { |
|
1255
|
8086 |
0 |
if (slot) { |
|
1265
|
0 |
0 |
if (SvROK(stored)) sv_rvweaken(stored); |
|
1283
|
21 |
0 |
if (!OpHAS_SIBLING(pushop)) { |
|
1287
|
21 |
0 |
selfop = OpSIBLING(pushop); |
|
1290
|
37 |
21 |
while (OpHAS_SIBLING(cvop)) { |
|
1292
|
37 |
0 |
cvop = OpSIBLING(cvop); |
|
1296
|
16 |
5 |
if (argop != selfop) { |
|
1298
|
16 |
0 |
OP *valop = OpSIBLING(selfop); |
|
1345
|
5127 |
0 |
if (items > 0 && SvPOK(ST(0)) && !SvROK(ST(0))) { |
|
|
5127 |
0 |
if (items > 0 && SvPOK(ST(0)) && !SvROK(ST(0))) { |
|
|
5127 |
0 |
if (items > 0 && SvPOK(ST(0)) && !SvROK(ST(0))) { |
|
1353
|
4059 |
1068 |
if (arg_count > 0 && (arg_count % 2) == 0 && SvPOK(ST(start_arg))) { |
|
|
3865 |
194 |
if (arg_count > 0 && (arg_count % 2) == 0 && SvPOK(ST(start_arg))) { |
|
|
3807 |
58 |
if (arg_count > 0 && (arg_count % 2) == 0 && SvPOK(ST(start_arg))) { |
|
1356
|
70 |
3737 |
if (hv_exists(meta->prop_to_idx, pv, len) || hv_exists(meta->arg_to_idx, pv, len)) { |
|
|
8 |
62 |
if (hv_exists(meta->prop_to_idx, pv, len) || hv_exists(meta->arg_to_idx, pv, len)) { |
|
1372
|
10633 |
5127 |
for (i = 1; i < slot_count; i++) { |
|
1374
|
10633 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
2384 |
8249 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
2384 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
1375
|
33 |
2351 |
if (SvROK(spec->default_sv)) { |
|
1376
|
30 |
3 |
if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVAV) { |
|
1378
|
3 |
0 |
} else if (SvTYPE(SvRV(spec->default_sv)) == SVt_PVHV) { |
|
1395
|
3745 |
1382 |
if (is_named) { |
|
1397
|
4716 |
3732 |
for (i = start_arg; i < items; i += 2) { |
|
1399
|
4716 |
0 |
SV *val_sv = (i + 1 < items) ? ST(i + 1) : &PL_sv_undef; |
|
1403
|
4713 |
3 |
if (idx_svp) { |
|
1408
|
4713 |
0 |
if (spec && spec->has_type) { |
|
|
4673 |
40 |
if (spec && spec->has_type) { |
|
1409
|
4673 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
11 |
4662 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
1411
|
13 |
4660 |
if (!check_slot_type(aTHX_ val_sv, spec)) { |
|
1412
|
3 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
1414
|
3 |
10 |
: type_id_to_name(spec->type_id); |
|
1421
|
4700 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
3 |
4697 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
3 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
1423
|
0 |
3 |
PUSHMARK(SP); |
|
1424
|
0 |
3 |
XPUSHs(obj_sv); |
|
1425
|
0 |
3 |
XPUSHs(val_sv); |
|
1436
|
1 |
1381 |
if (provided > slot_count - 1) provided = slot_count - 1; |
|
1438
|
798 |
1380 |
for (i = 0; i < provided; i++) { |
|
1444
|
798 |
0 |
if (spec && spec->has_type) { |
|
|
309 |
489 |
if (spec && spec->has_type) { |
|
1445
|
309 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
0 |
309 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
1447
|
2 |
307 |
if (!check_slot_type(aTHX_ val_sv, spec)) { |
|
1448
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
1450
|
0 |
2 |
: type_id_to_name(spec->type_id); |
|
1457
|
796 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
0 |
796 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
0 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
1459
|
0 |
0 |
PUSHMARK(SP); |
|
1460
|
0 |
0 |
XPUSHs(obj_sv); |
|
1461
|
0 |
0 |
XPUSHs(val_sv); |
|
1471
|
3234 |
1878 |
if (meta->has_any_builders) { |
|
1472
|
6470 |
3234 |
for (i = 1; i < slot_count; i++) { |
|
1474
|
6470 |
0 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
3234 |
3236 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
8 |
3226 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
|
7 |
1 |
if (spec && spec->has_builder && !spec->is_lazy && !SvOK(ary[i])) { |
|
1480
|
0 |
7 |
PUSHMARK(SP); |
|
1481
|
0 |
7 |
XPUSHs(obj_sv); |
|
1485
|
7 |
0 |
if (count > 0) { |
|
1489
|
7 |
0 |
if (spec->has_type) { |
|
1490
|
7 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
0 |
7 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
1492
|
0 |
7 |
if (!check_slot_type(aTHX_ built_val, spec)) { |
|
1493
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
1495
|
0 |
0 |
: type_id_to_name(spec->type_id); |
|
1504
|
7 |
0 |
FREETMPS; |
|
1511
|
2283 |
2829 |
if (meta->has_any_required) { |
|
1512
|
4657 |
2274 |
for (i = 1; i < slot_count; i++) { |
|
1514
|
4657 |
0 |
if (spec && spec->is_required && !SvOK(ary[i])) { |
|
|
2292 |
2365 |
if (spec && spec->is_required && !SvOK(ary[i])) { |
|
|
9 |
2283 |
if (spec && spec->is_required && !SvOK(ary[i])) { |
|
1521
|
6 |
5097 |
if (meta->has_any_weak) { |
|
1522
|
6 |
6 |
for (i = 1; i < slot_count; i++) { |
|
1524
|
6 |
0 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
|
6 |
0 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
|
3 |
3 |
if (spec && spec->is_weak && SvROK(ary[i])) { |
|
1532
|
212 |
4891 |
if (meta->has_build == 0) { |
|
1534
|
12 |
200 |
if (gv && GvCV(gv)) { |
|
|
12 |
0 |
if (gv && GvCV(gv)) { |
|
1541
|
25 |
5078 |
if (meta->has_build == 1) { |
|
1545
|
0 |
25 |
PUSHMARK(SP); |
|
1546
|
0 |
25 |
XPUSHs(obj_sv); |
|
1549
|
25 |
0 |
FREETMPS; |
|
1566
|
12257 |
0 |
if (!SvROK(self) || SvTYPE(rv) != SVt_PVAV) { |
|
|
0 |
12257 |
if (!SvROK(self) || SvTYPE(rv) != SVt_PVAV) { |
|
1571
|
33 |
12224 |
if (items > 1) { |
|
1573
|
1 |
32 |
if (SvMAGICAL(rv)) { |
|
1575
|
1 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
1 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
1580
|
32 |
0 |
if (idx <= AvFILLp(av)) { |
|
1582
|
32 |
0 |
if (slot) { |
|
1593
|
12224 |
0 |
if (idx <= AvFILLp(av)) { |
|
1595
|
12224 |
0 |
if (sv && SvOK(sv)) { |
|
|
12201 |
23 |
if (sv && SvOK(sv)) { |
|
1603
|
23 |
0 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
|
20 |
3 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
|
20 |
0 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
1645
|
0 |
154 |
if (!SvROK(obj)) croak("Not an object"); |
|
1647
|
0 |
154 |
if (SvTYPE(rv) != SVt_PVAV) croak("Not an object"); |
|
1651
|
0 |
154 |
if (data->expected_class && SvSTASH(rv) != data->expected_class->stash) { |
|
|
0 |
0 |
if (data->expected_class && SvSTASH(rv) != data->expected_class->stash) { |
|
1652
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
1658
|
154 |
0 |
if (idx <= AvFILLp(av)) { |
|
1660
|
154 |
0 |
if (sv) { |
|
1679
|
0 |
26 |
if (!SvROK(obj)) croak("Not an object"); |
|
1681
|
0 |
26 |
if (SvTYPE(rv) != SVt_PVAV) croak("Not an object"); |
|
1685
|
0 |
26 |
if (data->expected_class && SvSTASH(rv) != data->expected_class->stash) { |
|
|
0 |
0 |
if (data->expected_class && SvSTASH(rv) != data->expected_class->stash) { |
|
1686
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
1692
|
26 |
0 |
if (idx <= AvFILLp(av)) { |
|
1694
|
26 |
0 |
if (slot) { |
|
1708
|
0 |
267 |
if (!op) return false; |
|
1710
|
178 |
89 |
switch (op->op_type) { |
|
1735
|
0 |
228 |
if (!data) { |
|
1740
|
228 |
0 |
if (!OpHAS_SIBLING(pushop)) { |
|
1745
|
228 |
0 |
objop = OpSIBLING(pushop); |
|
1748
|
276 |
228 |
while (OpHAS_SIBLING(cvop)) { |
|
1750
|
276 |
0 |
cvop = OpSIBLING(cvop); |
|
1754
|
48 |
180 |
if (argop != objop) { |
|
1756
|
48 |
0 |
OP *valop = OpSIBLING(objop); |
|
1759
|
48 |
0 |
if (valop && OpSIBLING(valop) == cvop && |
|
|
48 |
0 |
if (valop && OpSIBLING(valop) == cvop && |
|
1760
|
26 |
13 |
is_simple_op(objop) && is_simple_op(valop)) { |
|
1778
|
67 |
113 |
if (!is_simple_op(objop)) { |
|
1801
|
174 |
0 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
|
0 |
174 |
if (!SvROK(obj) || SvTYPE(SvRV(obj)) != SVt_PVAV) { |
|
1807
|
0 |
174 |
if (data->expected_class && SvSTASH(SvRV(obj)) != data->expected_class->stash) { |
|
|
0 |
0 |
if (data->expected_class && SvSTASH(SvRV(obj)) != data->expected_class->stash) { |
|
1808
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
|
0 |
0 |
croak("Expected object of class '%s', got '%s'", |
|
1813
|
41 |
133 |
if (items > 1) { |
|
1815
|
41 |
0 |
if (idx <= AvFILLp(av)) { |
|
1817
|
41 |
0 |
if (slot) { |
|
1827
|
133 |
0 |
if (idx <= AvFILLp(av)) { |
|
1829
|
133 |
0 |
ST(0) = (sv && SvOK(sv)) ? sv : &PL_sv_undef; |
|
|
133 |
0 |
ST(0) = (sv && SvOK(sv)) ? sv : &PL_sv_undef; |
|
1850
|
42 |
55 |
if (cv) { |
|
1876
|
0 |
27 |
if (items < 1) croak("Usage: Object::Proto::import_accessors($class [, $package])"); |
|
1880
|
11 |
16 |
if (items > 1) { |
|
1884
|
16 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
16 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
16 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
16 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
16 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
16 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
1889
|
0 |
27 |
if (!meta) { |
|
1894
|
6 |
21 |
is_same_class = (class_len == pkg_len && strEQ(class_pv, pkg_pv)); |
|
|
5 |
1 |
is_same_class = (class_len == pkg_len && strEQ(class_pv, pkg_pv)); |
|
1897
|
82 |
27 |
for (i = 1; i < meta->slot_count; i++) { |
|
1898
|
82 |
0 |
if (meta->idx_to_prop[i]) { |
|
1918
|
0 |
15 |
if (items < 2) croak("Usage: Object::Proto::import_accessor($class, $prop [, $alias [, $package]])"); |
|
1924
|
15 |
0 |
if (items > 2 && SvOK(ST(2))) { |
|
|
15 |
0 |
if (items > 2 && SvOK(ST(2))) { |
|
1931
|
3 |
12 |
if (items > 3) { |
|
1934
|
12 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
12 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
12 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
12 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
12 |
0 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
12 |
pkg_pv = CopSTASHPV(PL_curcop); |
|
1939
|
0 |
15 |
if (!meta) { |
|
1945
|
0 |
15 |
if (!idx_svp) { |
|
1951
|
0 |
15 |
is_same_class = (class_len == pkg_len && strEQ(class_pv, pkg_pv)); |
|
|
0 |
0 |
is_same_class = (class_len == pkg_len && strEQ(class_pv, pkg_pv)); |
|
1971
|
57 |
0 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
57 |
0 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
57 |
0 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
0 |
57 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
57 |
0 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
|
0 |
57 |
caller_pkg = CopSTASHPV(PL_curcop); |
|
1975
|
0 |
57 |
if (!define_cv) croak("Object::Proto::define not found"); |
|
1982
|
57 |
0 |
if (GvCV(gv) == NULL) { |
|
1994
|
57 |
0 |
if (before_cv) { |
|
1997
|
57 |
0 |
if (GvCV(gv) == NULL) { |
|
2005
|
57 |
0 |
if (after_cv) { |
|
2008
|
57 |
0 |
if (GvCV(gv) == NULL) { |
|
2016
|
57 |
0 |
if (around_cv) { |
|
2019
|
57 |
0 |
if (GvCV(gv) == NULL) { |
|
2031
|
171 |
57 |
for (i = 0; i < 3; i++) { |
|
2035
|
171 |
0 |
if (cv) { |
|
2038
|
171 |
0 |
if (GvCV(gv) == NULL) { |
|
2064
|
0 |
154 |
if (cv) { |
|
2085
|
75691 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
|
0 |
75691 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
2090
|
26098 |
49593 |
if (items > 1) { |
|
2094
|
1 |
26097 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
1 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
2098
|
7 |
26090 |
if (spec->is_readonly) { |
|
2103
|
1008 |
25082 |
if (spec->is_required && !SvOK(val)) { |
|
|
2 |
1006 |
if (spec->is_required && !SvOK(val)) { |
|
2108
|
26088 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
6 |
26082 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
2112
|
26088 |
0 |
if (spec->has_type) { |
|
2113
|
19 |
26069 |
if (!check_slot_type(aTHX_ val, spec)) { |
|
2114
|
2 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
2116
|
2 |
17 |
: type_id_to_name(spec->type_id); |
|
2123
|
3 |
26066 |
if (spec->has_trigger && spec->trigger_cb) { |
|
|
3 |
0 |
if (spec->has_trigger && spec->trigger_cb) { |
|
2125
|
0 |
3 |
PUSHMARK(SP); |
|
2126
|
0 |
3 |
XPUSHs(self); |
|
2127
|
0 |
3 |
XPUSHs(val); |
|
2136
|
1 |
26068 |
if (spec->is_weak && SvROK(stored)) { |
|
|
1 |
0 |
if (spec->is_weak && SvROK(stored)) { |
|
2147
|
7424 |
42169 |
if (spec->is_lazy && !SvOK(result)) { |
|
|
3822 |
3602 |
if (spec->is_lazy && !SvOK(result)) { |
|
2150
|
3822 |
0 |
if (spec->has_builder && spec->builder_name) { |
|
|
3822 |
0 |
if (spec->has_builder && spec->builder_name) { |
|
2158
|
0 |
3822 |
PUSHMARK(SP); |
|
2159
|
0 |
3822 |
XPUSHs(self); |
|
2165
|
3822 |
0 |
if (count > 0) { |
|
2172
|
3822 |
0 |
FREETMPS; |
|
2174
|
0 |
0 |
} else if (spec->has_default && spec->default_sv) { |
|
|
0 |
0 |
} else if (spec->has_default && spec->default_sv) { |
|
2176
|
0 |
0 |
if (SvROK(spec->default_sv)) { |
|
2179
|
0 |
0 |
if (SvTYPE(inner) == SVt_PVAV) { |
|
2181
|
0 |
0 |
} else if (SvTYPE(inner) == SVt_PVHV) { |
|
2191
|
3822 |
0 |
if (built_val) { |
|
2193
|
3822 |
0 |
if (spec->has_type && SvOK(built_val)) { |
|
|
3822 |
0 |
if (spec->has_type && SvOK(built_val)) { |
|
2194
|
0 |
3822 |
if (!check_slot_type(aTHX_ built_val, spec)) { |
|
2195
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
2197
|
0 |
0 |
: type_id_to_name(spec->type_id); |
|
2224
|
37 |
0 |
if (!OpHAS_SIBLING(pushop)) { |
|
2228
|
37 |
0 |
selfop = OpSIBLING(pushop); |
|
2231
|
43 |
37 |
while (OpHAS_SIBLING(cvop)) { |
|
2233
|
43 |
0 |
cvop = OpSIBLING(cvop); |
|
2237
|
6 |
31 |
if (argop != selfop) { |
|
2239
|
6 |
0 |
OP *valop = OpSIBLING(selfop); |
|
2277
|
13 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
|
0 |
13 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
2283
|
13 |
0 |
if (spec && spec->is_lazy && spec->has_builder && spec->builder_name) { |
|
|
1 |
12 |
if (spec && spec->is_lazy && spec->has_builder && spec->builder_name) { |
|
|
1 |
0 |
if (spec && spec->is_lazy && spec->has_builder && spec->builder_name) { |
|
|
1 |
0 |
if (spec && spec->is_lazy && spec->has_builder && spec->builder_name) { |
|
2284
|
1 |
0 |
if (idx <= AvFILLp(av)) { |
|
2286
|
1 |
0 |
if (!slot || !SvOK(slot)) { |
|
|
1 |
0 |
if (!slot || !SvOK(slot)) { |
|
2292
|
0 |
1 |
PUSHMARK(SP); |
|
2293
|
0 |
1 |
XPUSHs(self); |
|
2297
|
1 |
0 |
if (count > 0) { |
|
2301
|
1 |
0 |
if (spec->has_type) { |
|
2302
|
1 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
0 |
1 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
2304
|
0 |
1 |
if (!check_slot_type(aTHX_ built_val, spec)) { |
|
2305
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
2307
|
0 |
0 |
: type_id_to_name(spec->type_id); |
|
2316
|
1 |
0 |
FREETMPS; |
|
2323
|
13 |
0 |
if (idx <= AvFILLp(av)) { |
|
2325
|
13 |
0 |
if (sv && SvOK(sv)) { |
|
|
13 |
0 |
if (sv && SvOK(sv)) { |
|
2333
|
0 |
0 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
|
0 |
0 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
|
0 |
0 |
if (proto && SvROK(*proto) && SvTYPE(SvRV(*proto)) == SVt_PVAV) { |
|
2354
|
14 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
|
0 |
14 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
2359
|
1 |
13 |
if (items < 2) { |
|
2365
|
1 |
12 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
1 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
2370
|
12 |
0 |
if (spec && spec->is_readonly) { |
|
|
1 |
11 |
if (spec && spec->is_readonly) { |
|
2378
|
11 |
0 |
if (spec && spec->is_required && !SvOK(val)) { |
|
|
1 |
10 |
if (spec && spec->is_required && !SvOK(val)) { |
|
|
1 |
0 |
if (spec && spec->is_required && !SvOK(val)) { |
|
2383
|
10 |
0 |
if (spec && spec->has_type) { |
|
|
10 |
0 |
if (spec && spec->has_type) { |
|
2384
|
10 |
0 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
|
0 |
10 |
if (spec->has_coerce || spec->type_id == TYPE_CUSTOM) |
|
2386
|
1 |
9 |
if (!check_slot_type(aTHX_ val, spec)) { |
|
2387
|
0 |
0 |
const char *type_name = (spec->type_id == TYPE_CUSTOM && spec->registered) |
|
2389
|
0 |
1 |
: type_id_to_name(spec->type_id); |
|
2396
|
9 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
1 |
8 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
|
1 |
0 |
if (spec && spec->has_trigger && spec->trigger_cb) { |
|
2398
|
0 |
1 |
PUSHMARK(SP); |
|
2399
|
0 |
1 |
XPUSHs(self); |
|
2400
|
0 |
1 |
XPUSHs(val); |
|
2406
|
9 |
0 |
if (idx <= AvFILLp(av)) { |
|
2408
|
9 |
0 |
if (slot) { |
|
2411
|
9 |
0 |
if (spec && spec->is_weak && SvROK(slot)) { |
|
|
1 |
8 |
if (spec && spec->is_weak && SvROK(slot)) { |
|
|
1 |
0 |
if (spec && spec->is_weak && SvROK(slot)) { |
|
2422
|
0 |
0 |
if (spec && spec->is_weak && SvROK(stored)) { |
|
|
0 |
0 |
if (spec && spec->is_weak && SvROK(stored)) { |
|
|
0 |
0 |
if (spec && spec->is_weak && SvROK(stored)) { |
|
2441
|
0 |
11 |
if (cv) { |
|
2463
|
0 |
12 |
if (cv) { |
|
2486
|
13 |
383 |
if (cv) { |
|
2489
|
13 |
0 |
if (data) { |
|
2519
|
9820 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
|
0 |
9820 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
2526
|
1 |
9819 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
1 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
2543
|
3 |
13 |
if (custom_name && SvOK(custom_name)) { |
|
|
3 |
0 |
if (custom_name && SvOK(custom_name)) { |
|
2551
|
1 |
15 |
if (cv) { |
|
2574
|
10232 |
0 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
|
0 |
10232 |
if (!SvROK(self) || SvTYPE(SvRV(self)) != SVt_PVAV) { |
|
2581
|
10232 |
0 |
if (svp && SvOK(*svp)) { |
|
|
6220 |
4012 |
if (svp && SvOK(*svp)) { |
|
2595
|
3 |
12 |
if (custom_name && SvOK(custom_name)) { |
|
|
3 |
0 |
if (custom_name && SvOK(custom_name)) { |
|
2603
|
1 |
14 |
if (cv) { |
|
2627
|
4 |
0 |
if (meta && meta->demolish_cv) { |
|
|
4 |
0 |
if (meta && meta->demolish_cv) { |
|
2631
|
0 |
4 |
PUSHMARK(SP); |
|
2632
|
0 |
4 |
XPUSHs(self); |
|
2637
|
4 |
0 |
if (SvTRUE(ERRSV)) { |
|
|
0 |
4 |
if (SvTRUE(ERRSV)) { |
|
2638
|
0 |
0 |
warn("Error in DEMOLISH: %s", SvPV_nolen(ERRSV)); |
|
2640
|
0 |
4 |
FREETMPS; |
|
2656
|
0 |
2 |
if (cv) { |
|
2670
|
2 |
18 |
if (!g_role_registry) return NULL; |
|
2672
|
13 |
5 |
if (svp && SvIOK(*svp)) { |
|
|
13 |
0 |
if (svp && SvIOK(*svp)) { |
|
2679
|
2 |
5 |
if (!g_role_registry) { |
|
2693
|
4 |
0 |
if (!from_gv || !(cv = GvCV(from_gv))) { |
|
|
0 |
4 |
if (!from_gv || !(cv = GvCV(from_gv))) { |
|
2699
|
0 |
4 |
if (to_gv && GvCV(to_gv)) { |
|
|
0 |
0 |
if (to_gv && GvCV(to_gv)) { |
|
2704
|
4 |
0 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
|
4 |
0 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
|
0 |
4 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
|
0 |
0 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
|
4 |
0 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
|
0 |
4 |
snprintf(full_name, sizeof(full_name), "%s::%s", HvNAME(to_stash), method_name); |
|
2706
|
4 |
0 |
if (to_gv) { |
|
2719
|
5 |
9 |
for (i = 0; i < role_meta->required_count; i++) { |
|
2722
|
3 |
2 |
if (!gv || !GvCV(gv)) { |
|
|
0 |
3 |
if (!gv || !GvCV(gv)) { |
|
2729
|
10 |
8 |
for (i = 0; i < role_meta->slot_count; i++) { |
|
2736
|
1 |
9 |
if (existing) { |
|
2743
|
0 |
9 |
Renew(class_meta->slots, class_meta->slot_count, SlotSpec*); |
|
2744
|
0 |
9 |
Renew(class_meta->idx_to_prop, class_meta->slot_count, char*); |
|
2753
|
0 |
9 |
if (role_slot->init_arg) { |
|
2763
|
9 |
0 |
if (role_slot->has_type) { |
|
2766
|
4 |
5 |
if (role_slot->has_default) { |
|
2769
|
0 |
9 |
if (role_slot->has_trigger) { |
|
2772
|
0 |
9 |
if (role_slot->is_required) { |
|
2775
|
0 |
9 |
if (role_slot->is_lazy) { |
|
2778
|
1 |
8 |
if (role_slot->has_builder) { |
|
2781
|
0 |
9 |
if (role_slot->is_weak) { |
|
2786
|
0 |
9 |
if (role_slot->has_type || role_slot->has_trigger || role_slot->has_coerce || |
|
|
0 |
0 |
if (role_slot->has_type || role_slot->has_trigger || role_slot->has_coerce || |
|
|
0 |
0 |
if (role_slot->has_type || role_slot->has_trigger || role_slot->has_coerce || |
|
2787
|
0 |
0 |
role_slot->is_readonly || role_slot->is_lazy || role_slot->is_required || role_slot->is_weak) { |
|
|
0 |
0 |
role_slot->is_readonly || role_slot->is_lazy || role_slot->is_required || role_slot->is_weak) { |
|
|
0 |
0 |
role_slot->is_readonly || role_slot->is_lazy || role_slot->is_required || role_slot->is_weak) { |
|
|
0 |
0 |
role_slot->is_readonly || role_slot->is_lazy || role_slot->is_required || role_slot->is_weak) { |
|
2793
|
0 |
9 |
if (role_slot->has_clearer) { |
|
2796
|
0 |
9 |
if (role_slot->has_predicate) { |
|
2799
|
0 |
9 |
if (role_slot->reader_name) { |
|
2802
|
0 |
9 |
if (role_slot->writer_name) { |
|
2808
|
8 |
0 |
if (role_meta->stash) { |
|
2810
|
4 |
8 |
while ((entry = hv_iternext(role_meta->stash))) { |
|
2811
|
0 |
4 |
const char *name = HePV(entry, PL_na); |
|
2813
|
0 |
4 |
if (name[0] != '_' || strncmp(name, "_build_", 7) == 0) { |
|
|
0 |
0 |
if (name[0] != '_' || strncmp(name, "_build_", 7) == 0) { |
|
2820
|
0 |
8 |
Renew(class_meta->consumed_roles, class_meta->role_count + 1, RoleMeta*); |
|
2834
|
4 |
6 |
if (!meta->modified_methods) { |
|
2839
|
6 |
4 |
if (svp && SvIOK(*svp)) { |
|
|
6 |
0 |
if (svp && SvIOK(*svp)) { |
|
2849
|
4 |
0 |
if (gv && GvCV(gv)) { |
|
|
4 |
0 |
if (gv && GvCV(gv)) { |
|
2873
|
10 |
7 |
for (i = 0; i < items; i++) { |
|
2878
|
8 |
7 |
for (m = mod->before_chain; m; m = m->next) { |
|
2882
|
0 |
8 |
PUSHMARK(SP); |
|
2883
|
12 |
8 |
for (i = 0; i <= av_len(saved_args); i++) { |
|
2885
|
0 |
12 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
|
12 |
0 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
2889
|
0 |
8 |
FREETMPS; |
|
2898
|
2 |
5 |
if (mod->around_chain) { |
|
2905
|
0 |
2 |
PUSHMARK(SP); |
|
2906
|
0 |
2 |
XPUSHs(sv_2mortal(newRV_inc((SV*)mod->original_cv))); |
|
2907
|
3 |
2 |
for (i = 0; i <= av_len(saved_args); i++) { |
|
2909
|
0 |
3 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
|
3 |
0 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
2912
|
0 |
2 |
count = call_sv(m->callback, gimme == G_ARRAY ? G_LIST : G_SCALAR); |
|
2915
|
2 |
2 |
for (i = 0; i < count; i++) { |
|
2918
|
2 |
0 |
FREETMPS; |
|
2921
|
5 |
0 |
} else if (mod->original_cv) { |
|
2926
|
0 |
5 |
PUSHMARK(SP); |
|
2927
|
7 |
5 |
for (i = 0; i <= av_len(saved_args); i++) { |
|
2929
|
0 |
7 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
|
7 |
0 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
2932
|
0 |
5 |
count = call_sv((SV*)mod->original_cv, gimme == G_ARRAY ? G_LIST : G_SCALAR); |
|
2935
|
5 |
5 |
for (i = 0; i < count; i++) { |
|
2938
|
5 |
0 |
FREETMPS; |
|
2943
|
5 |
7 |
for (m = mod->after_chain; m; m = m->next) { |
|
2947
|
0 |
5 |
PUSHMARK(SP); |
|
2948
|
7 |
5 |
for (i = 0; i <= av_len(saved_args); i++) { |
|
2950
|
0 |
7 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
|
7 |
0 |
XPUSHs(svp ? *svp : &PL_sv_undef); |
|
2954
|
0 |
5 |
FREETMPS; |
|
2961
|
7 |
7 |
for (i = count - 1; i >= 0; i--) { |
|
2964
|
7 |
0 |
ST(count - 1 - i) = sv_mortalcopy(svp ? *svp : &PL_sv_undef); |
|
2981
|
10 |
0 |
if (existing_cv && CvXSUB(existing_cv) == xs_modified_method_wrapper) { |
|
|
6 |
4 |
if (existing_cv && CvXSUB(existing_cv) == xs_modified_method_wrapper) { |
|
2991
|
4 |
0 |
if (GvCV(gv)) { |
|
3017
|
3 |
1 |
if (!mod->after_chain) { |
|
3021
|
0 |
1 |
while (last->next) last = last->next; |
|
3052
|
0 |
251 |
if (items < 1) croak("Usage: Object::Proto::define($class, @properties)"); |
|
3057
|
252 |
228 |
for (i = 1; i < items - 1; i++) { |
|
3060
|
31 |
221 |
if (klen == 7 && memEQ(kpv, "extends", 7)) { |
|
|
23 |
8 |
if (klen == 7 && memEQ(kpv, "extends", 7)) { |
|
3062
|
3 |
20 |
if (SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVAV) { |
|
|
3 |
0 |
if (SvROK(val) && SvTYPE(SvRV(val)) == SVt_PVAV) { |
|
3067
|
0 |
3 |
Newx(parent_metas, plen, ClassMeta*); |
|
3069
|
6 |
2 |
for (p = 0; p < plen; p++) { |
|
3071
|
6 |
0 |
if (elem && SvPOK(*elem)) { |
|
|
6 |
0 |
if (elem && SvPOK(*elem)) { |
|
3075
|
1 |
5 |
if (!pmeta) { |
|
3087
|
1 |
19 |
if (!pmeta) { |
|
3097
|
31 |
21 |
for (j = i; j < items - 2; j++) { |
|
3108
|
249 |
0 |
if (!meta) { |
|
3114
|
21 |
228 |
if (parent_count > 0) { |
|
3115
|
0 |
21 |
Newx(meta->parent_classes, parent_count, char*); |
|
3116
|
0 |
21 |
Newx(meta->parent_metas, parent_count, ClassMeta*); |
|
3118
|
23 |
21 |
for (i = 0; i < parent_count; i++) { |
|
3131
|
23 |
249 |
for (i = 0; i < parent_count; i++) { |
|
3135
|
0 |
249 |
Renew(meta->idx_to_prop, max_slots + 1, char*); |
|
3136
|
0 |
249 |
Renew(meta->slots, max_slots + 1, SlotSpec*); |
|
3137
|
1041 |
249 |
for (i = 0; i <= max_slots; i++) { |
|
3144
|
23 |
249 |
for (i = 0; i < parent_count; i++) { |
|
3147
|
56 |
23 |
for (j = 1; j < pmeta->slot_count; j++) { |
|
3149
|
56 |
0 |
if (parent_spec) { |
|
3153
|
1 |
55 |
if (existing && SvIOK(*existing)) continue; |
|
|
1 |
0 |
if (existing && SvIOK(*existing)) continue; |
|
3159
|
53 |
2 |
if (cloned->has_type) meta->has_any_types = 1; |
|
3160
|
38 |
17 |
if (cloned->has_default) meta->has_any_defaults = 1; |
|
3161
|
0 |
55 |
if (cloned->has_trigger) meta->has_any_triggers = 1; |
|
3162
|
11 |
44 |
if (cloned->is_required) meta->has_any_required = 1; |
|
3163
|
0 |
55 |
if (cloned->is_lazy) meta->has_any_lazy = 1; |
|
3164
|
1 |
54 |
if (cloned->has_builder) meta->has_any_builders = 1; |
|
3165
|
0 |
55 |
if (cloned->is_weak) meta->has_any_weak = 1; |
|
3170
|
1 |
54 |
if (cloned->init_arg) { |
|
3180
|
2 |
53 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
2 |
0 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
2 |
0 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
2 |
0 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
2 |
0 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
2 |
0 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
|
0 |
2 |
if (cloned->has_type || cloned->has_trigger || cloned->has_coerce || cloned->is_readonly || cloned->is_lazy || cloned->is_required || cloned->is_weak) { |
|
3185
|
1 |
54 |
if (cloned->has_clearer) { |
|
3188
|
1 |
54 |
if (cloned->has_predicate) { |
|
3191
|
1 |
54 |
if (cloned->reader_name) { |
|
3194
|
1 |
54 |
if (cloned->writer_name) { |
|
3202
|
487 |
248 |
for (i = first_prop; i < items; i++) { |
|
3213
|
487 |
0 |
if (spec_len > 0 && spec_pv[0] == '+') { |
|
|
12 |
475 |
if (spec_len > 0 && spec_pv[0] == '+') { |
|
3225
|
12 |
475 |
if (is_modification) { |
|
3230
|
11 |
1 |
if (!existing || !SvIOK(*existing)) { |
|
|
0 |
11 |
if (!existing || !SvIOK(*existing)) { |
|
3246
|
11 |
0 |
if (parent_spec) { |
|
3250
|
2 |
473 |
} else if (existing && SvIOK(*existing)) { |
|
|
2 |
0 |
} else if (existing && SvIOK(*existing)) { |
|
3254
|
2 |
0 |
if (meta->slots[idx]) { |
|
3265
|
333 |
153 |
if (spec->has_type) meta->has_any_types = 1; |
|
3266
|
78 |
408 |
if (spec->has_default) meta->has_any_defaults = 1; |
|
3267
|
4 |
482 |
if (spec->has_trigger) meta->has_any_triggers = 1; |
|
3268
|
36 |
450 |
if (spec->is_required) meta->has_any_required = 1; |
|
3269
|
19 |
467 |
if (spec->has_builder) meta->has_any_builders = 1; |
|
3270
|
7 |
479 |
if (spec->is_weak) meta->has_any_weak = 1; |
|
3276
|
9 |
477 |
if (spec->init_arg) { |
|
3288
|
14 |
472 |
if (spec->is_lazy) meta->has_any_lazy = 1; |
|
3291
|
153 |
333 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
153 |
0 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
153 |
0 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
153 |
0 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
153 |
0 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
152 |
1 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
|
0 |
152 |
if (spec->has_type || spec->has_trigger || spec->has_coerce || spec->is_readonly || spec->is_lazy || spec->is_required || spec->is_weak) { |
|
3298
|
15 |
471 |
if (spec->has_clearer) { |
|
3303
|
14 |
472 |
if (spec->has_predicate) { |
|
3308
|
10 |
476 |
if (spec->reader_name) { |
|
3313
|
11 |
475 |
if (spec->writer_name) { |
|
3319
|
20 |
228 |
if (parent_count > 0) { |
|
3321
|
22 |
20 |
for (i = 0; i < parent_count; i++) { |
|
3352
|
2 |
246 |
if (demolish_cv) { |
|
3365
|
1 |
247 |
if (build_cv) { |
|
3379
|
0 |
3011 |
if (items < 1) croak("Usage: Object::Proto::prototype($obj)"); |
|
3381
|
3010 |
1 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
|
0 |
3010 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
3386
|
3010 |
0 |
if (svp && SvOK(*svp)) { |
|
|
3009 |
1 |
if (svp && SvOK(*svp)) { |
|
3399
|
0 |
39 |
if (items < 2) croak("Usage: Object::Proto::set_prototype($obj, $proto)"); |
|
3401
|
38 |
1 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
|
0 |
38 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
3407
|
2 |
36 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
1 |
1 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
3424
|
0 |
4 |
if (items < 1) croak("Usage: Object::Proto::prototype_chain($obj)"); |
|
3426
|
4 |
0 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
|
0 |
4 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
3433
|
0 |
7 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
|
7 |
0 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
3437
|
4 |
7 |
for (i = 0; i < depth; i++) { |
|
3438
|
0 |
4 |
if (visited[i] == av) { |
|
3449
|
0 |
7 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
|
4 |
3 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
|
0 |
3 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
3473
|
0 |
6 |
if (items < 2) croak("Usage: Object::Proto::has_own_property($obj, $property)"); |
|
3475
|
6 |
0 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
|
0 |
6 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
3484
|
0 |
6 |
if (!meta) { |
|
3490
|
0 |
6 |
if (!idx_sv) { |
|
3496
|
6 |
0 |
if (svp && SvOK(*svp)) { |
|
|
3 |
3 |
if (svp && SvOK(*svp)) { |
|
3510
|
0 |
4 |
if (items < 1) croak("Usage: Object::Proto::prototype_depth($obj)"); |
|
3512
|
4 |
0 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
|
0 |
4 |
if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) { |
|
3518
|
0 |
7 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
|
7 |
0 |
while (av && depth < MAX_PROTOTYPE_DEPTH) { |
|
3522
|
4 |
7 |
for (i = 0; i < depth; i++) { |
|
3523
|
0 |
4 |
if (visited[i] == av) { |
|
3530
|
0 |
7 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
|
4 |
3 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
|
0 |
3 |
if (!proto_svp || !SvROK(*proto_svp) || SvTYPE(SvRV(*proto_svp)) != SVt_PVAV) { |
|
3545
|
0 |
413 |
if (items < 1) croak("Usage: Object::Proto::lock($obj)"); |
|
3546
|
410 |
3 |
VALIDATE_OBJECT(ST(0), "Object::Proto::lock"); |
|
|
410 |
0 |
VALIDATE_OBJECT(ST(0), "Object::Proto::lock"); |
|
|
0 |
410 |
VALIDATE_OBJECT(ST(0), "Object::Proto::lock"); |
|
3549
|
11 |
399 |
if (!mg) mg = add_object_magic(aTHX_ ST(0)); |
|
3550
|
0 |
410 |
if (mg->mg_private & OBJ_FLAG_FROZEN) { |
|
3561
|
0 |
404 |
if (items < 1) croak("Usage: Object::Proto::unlock($obj)"); |
|
3562
|
403 |
1 |
VALIDATE_OBJECT(ST(0), "Object::Proto::unlock"); |
|
|
403 |
0 |
VALIDATE_OBJECT(ST(0), "Object::Proto::unlock"); |
|
|
0 |
403 |
VALIDATE_OBJECT(ST(0), "Object::Proto::unlock"); |
|
3565
|
403 |
0 |
if (mg) { |
|
3566
|
1 |
402 |
if (mg->mg_private & OBJ_FLAG_FROZEN) { |
|
3578
|
0 |
14 |
if (items < 1) croak("Usage: Object::Proto::freeze($obj)"); |
|
3579
|
13 |
1 |
VALIDATE_OBJECT(ST(0), "Object::Proto::freeze"); |
|
|
13 |
0 |
VALIDATE_OBJECT(ST(0), "Object::Proto::freeze"); |
|
|
1 |
12 |
VALIDATE_OBJECT(ST(0), "Object::Proto::freeze"); |
|
3582
|
11 |
1 |
if (!mg) mg = add_object_magic(aTHX_ ST(0)); |
|
3591
|
0 |
3009 |
if (items < 1) croak("Usage: Object::Proto::is_frozen($obj)"); |
|
3592
|
3008 |
1 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_frozen"); |
|
|
3008 |
0 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_frozen"); |
|
|
0 |
3008 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_frozen"); |
|
3595
|
3005 |
3 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
|
3005 |
0 |
if (mg && (mg->mg_private & OBJ_FLAG_FROZEN)) { |
|
3605
|
0 |
3418 |
if (items < 1) croak("Usage: Object::Proto::is_locked($obj)"); |
|
3606
|
3417 |
1 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_locked"); |
|
|
3417 |
0 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_locked"); |
|
|
0 |
3417 |
VALIDATE_OBJECT(ST(0), "Object::Proto::is_locked"); |
|
3609
|
2411 |
1006 |
if (mg && (mg->mg_private & OBJ_FLAG_LOCKED)) { |
|
|
2409 |
2 |
if (mg && (mg->mg_private & OBJ_FLAG_LOCKED)) { |
|
3629
|
15275 |
12258 |
if (!SvROK(src)) { |
|
3636
|
1 |
12257 |
if (cached) { |
|
3640
|
12250 |
7 |
if (SvTYPE(SvRV(src)) == SVt_PVAV) { |
|
3647
|
6629 |
5621 |
if (SvOBJECT(SvRV(src))) |
|
3654
|
27528 |
12250 |
for (i = 0; i <= len; i++) { |
|
3656
|
27528 |
0 |
if (svp && SvOK(*svp)) { |
|
|
20891 |
6637 |
if (svp && SvOK(*svp)) { |
|
3664
|
6 |
1 |
} else if (SvTYPE(SvRV(src)) == SVt_PVHV) { |
|
3671
|
0 |
6 |
if (SvOBJECT(SvRV(src))) |
|
3677
|
10 |
6 |
while ((he = hv_iternext(src_hv))) { |
|
3679
|
0 |
10 |
const char *key = HePV(he, klen); |
|
3685
|
1 |
0 |
} else if (SvTYPE(SvRV(src)) < SVt_PVAV) { |
|
3689
|
0 |
1 |
if (SvOBJECT(SvRV(src))) |
|
3708
|
0 |
6637 |
if (items < 1) croak("Usage: Object::Proto::clone($val) or $obj->clone()"); |
|
3713
|
6 |
6631 |
if (!SvROK(src)) { |
|
3714
|
4 |
2 |
if (SvOK(src)) { |
|
3745
|
0 |
10620 |
if (items < 1) croak("Usage: Object::Proto::properties($class)"); |
|
3750
|
4002 |
6618 |
if (!meta) { |
|
3752
|
2001 |
2001 |
if (GIMME_V == G_ARRAY) { |
|
3759
|
4617 |
2001 |
if (GIMME_V == G_ARRAY) { |
|
3763
|
4617 |
0 |
EXTEND(SP, count); |
|
|
0 |
4617 |
EXTEND(SP, count); |
|
3765
|
13860 |
4617 |
for (i = 1; i < meta->slot_count; i++) { |
|
3766
|
13860 |
0 |
if (meta->idx_to_prop[i]) { |
|
3788
|
0 |
16830 |
if (items < 2) croak("Usage: Object::Proto::slot_info($class, $property)"); |
|
3795
|
2002 |
14828 |
if (!meta) { |
|
3801
|
2002 |
12826 |
if (!idx_svp) { |
|
3814
|
12826 |
0 |
spec = (meta->slots && idx < meta->slot_count) ? meta->slots[idx] : NULL; |
|
|
12826 |
0 |
spec = (meta->slots && idx < meta->slot_count) ? meta->slots[idx] : NULL; |
|
3816
|
12826 |
0 |
if (spec && spec->has_type) { |
|
|
10824 |
2002 |
if (spec && spec->has_type) { |
|
3818
|
1 |
10823 |
if (spec->type_id == TYPE_CUSTOM && spec->registered) { |
|
|
1 |
0 |
if (spec->type_id == TYPE_CUSTOM && spec->registered) { |
|
3827
|
12826 |
0 |
hv_store(info, "is_required", 11, newSViv(spec ? spec->is_required : 0), 0); |
|
3828
|
12826 |
0 |
hv_store(info, "is_readonly", 11, newSViv(spec ? spec->is_readonly : 0), 0); |
|
3829
|
12826 |
0 |
hv_store(info, "is_lazy", 7, newSViv(spec ? spec->is_lazy : 0), 0); |
|
3830
|
12826 |
0 |
hv_store(info, "is_weak", 7, newSViv(spec ? spec->is_weak : 0), 0); |
|
3831
|
12826 |
0 |
hv_store(info, "has_default", 11, newSViv(spec ? spec->has_default : 0), 0); |
|
3832
|
12826 |
0 |
hv_store(info, "has_trigger", 11, newSViv(spec ? spec->has_trigger : 0), 0); |
|
3833
|
12826 |
0 |
hv_store(info, "has_coerce", 10, newSViv(spec ? spec->has_coerce : 0), 0); |
|
3834
|
12826 |
0 |
hv_store(info, "has_builder", 11, newSViv(spec ? spec->has_builder : 0), 0); |
|
3835
|
12826 |
0 |
hv_store(info, "has_clearer", 11, newSViv(spec ? spec->has_clearer : 0), 0); |
|
3836
|
12826 |
0 |
hv_store(info, "has_predicate", 13, newSViv(spec ? spec->has_predicate : 0), 0); |
|
3837
|
12826 |
0 |
hv_store(info, "has_type", 8, newSViv(spec ? spec->has_type : 0), 0); |
|
3840
|
12826 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
5204 |
7622 |
if (spec && spec->has_default && spec->default_sv) { |
|
|
5204 |
0 |
if (spec && spec->has_default && spec->default_sv) { |
|
3845
|
12826 |
0 |
if (spec && spec->has_builder && spec->builder_name) { |
|
|
2 |
12824 |
if (spec && spec->has_builder && spec->builder_name) { |
|
|
2 |
0 |
if (spec && spec->has_builder && spec->builder_name) { |
|
3850
|
12826 |
0 |
if (spec && spec->init_arg) { |
|
|
1 |
12825 |
if (spec && spec->init_arg) { |
|
3865
|
0 |
7 |
if (items < 1) croak("Usage: Object::Proto::parent($class)"); |
|
3870
|
7 |
0 |
if (!meta || meta->parent_count == 0) { |
|
|
2 |
5 |
if (!meta || meta->parent_count == 0) { |
|
3871
|
0 |
2 |
if (GIMME_V == G_ARRAY) { |
|
3877
|
1 |
4 |
if (GIMME_V == G_ARRAY) { |
|
3881
|
1 |
0 |
EXTEND(SP, meta->parent_count); |
|
|
0 |
1 |
EXTEND(SP, meta->parent_count); |
|
3882
|
2 |
1 |
for (i = 0; i < meta->parent_count; i++) { |
|
3904
|
0 |
4 |
if (items < 1) croak("Usage: Object::Proto::ancestors($class)"); |
|
3911
|
4 |
0 |
if (meta && meta->parent_count > 0) { |
|
|
3 |
1 |
if (meta && meta->parent_count > 0) { |
|
3918
|
4 |
3 |
for (i = 0; i < meta->parent_count; i++) { |
|
3923
|
5 |
3 |
while (av_len(queue) >= 0) { |
|
3930
|
0 |
5 |
if (hv_exists(seen, cur_name, cur_len)) { |
|
3939
|
5 |
0 |
if (cur_meta) { |
|
3940
|
1 |
5 |
for (i = 0; i < cur_meta->parent_count; i++) { |
|
3942
|
1 |
0 |
if (!hv_exists(seen, pname, strlen(pname))) { |
|
3950
|
3 |
0 |
EXTEND(SP, count); |
|
|
0 |
3 |
EXTEND(SP, count); |
|
3951
|
5 |
3 |
for (i = 0; i < count; i++) { |
|
3953
|
5 |
0 |
if (elem) PUSHs(sv_2mortal(newSVsv(*elem))); |
|
3975
|
52 |
0 |
if (PL_dirty) { |
|
4001
|
0 |
0 |
if (!g_type_registry) { |
|
4007
|
0 |
0 |
if (existing) { |
|
4027
|
0 |
0 |
if (!g_type_registry) return NULL; |
|
4030
|
0 |
0 |
if (svp && SvIOK(*svp)) { |
|
|
0 |
0 |
if (svp && SvIOK(*svp)) { |
|
4043
|
0 |
8 |
if (items < 2) croak("Usage: Object::Proto::register_type($name, $check_cb [, $coerce_cb])"); |
|
4048
|
8 |
0 |
if (g_type_registry) { |
|
4050
|
1 |
7 |
if (existing) { |
|
4067
|
3 |
4 |
if (items > 2 && SvOK(ST(2))) { |
|
|
3 |
0 |
if (items > 2 && SvOK(ST(2))) { |
|
4083
|
0 |
4010 |
if (items < 1) croak("Usage: Object::Proto::has_type($name)"); |
|
4089
|
3003 |
1007 |
if (builtin != TYPE_NONE) { |
|
4094
|
1007 |
0 |
if (g_type_registry) { |
|
4096
|
6 |
1001 |
if (existing) { |
|
4124
|
2402 |
0 |
if (g_type_registry) { |
|
4127
|
4 |
2402 |
while ((he = hv_iternext(g_type_registry))) { |
|
4148
|
0 |
8053 |
if (!meta) { |
|
4153
|
8045 |
8 |
if (meta->singleton_instance && SvOK(meta->singleton_instance)) { |
|
|
8045 |
0 |
if (meta->singleton_instance && SvOK(meta->singleton_instance)) { |
|
4170
|
0 |
8 |
PUSHMARK(SP); |
|
4171
|
0 |
8 |
XPUSHs(sv_2mortal(newSVpv(meta->class_name, 0))); |
|
4178
|
0 |
8 |
if (count != 1) { |
|
4190
|
8 |
0 |
if (build_gv && GvCV(build_gv)) { |
|
|
5 |
3 |
if (build_gv && GvCV(build_gv)) { |
|
4191
|
0 |
5 |
PUSHMARK(SP); |
|
4192
|
0 |
5 |
XPUSHs(obj); |
|
4200
|
8 |
0 |
FREETMPS; |
|
4220
|
0 |
7 |
if (items < 1) croak("Usage: Object::Proto::role($role_name, @slot_specs)"); |
|
4226
|
0 |
7 |
if (meta) { |
|
4238
|
6 |
1 |
if (items > 1) { |
|
4242
|
8 |
6 |
for (i = 1; i < items; i++) { |
|
4263
|
0 |
2 |
if (items < 2) croak("Usage: Object::Proto::requires($role_name, @method_names)"); |
|
4267
|
0 |
2 |
if (!meta) { |
|
4272
|
0 |
2 |
Renew(meta->required_methods, meta->required_count + items - 1, char*); |
|
4273
|
2 |
2 |
for (i = 1; i < items; i++) { |
|
4293
|
0 |
9 |
if (items < 2) croak("Usage: Object::Proto::with($class_name, @role_names)"); |
|
4297
|
0 |
9 |
if (!class_meta) { |
|
4301
|
11 |
6 |
for (i = 1; i < items; i++) { |
|
4306
|
0 |
11 |
if (!role_meta) { |
|
4311
|
0 |
0 |
err = ERRSV; |
|
4312
|
0 |
0 |
if (SvTRUE(err)) { |
|
4317
|
0 |
11 |
if (!role_meta) { |
|
4335
|
0 |
8 |
if (items < 2) croak("Usage: Object::Proto::does($class_or_obj, $role_name)"); |
|
4338
|
7 |
1 |
if (SvROK(ST(0))) { |
|
4341
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
7 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
7 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
7 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
7 |
0 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
|
0 |
7 |
meta = get_class_meta(aTHX_ HvNAME(stash), HvNAMELEN(stash)); |
|
4348
|
0 |
8 |
if (!meta) { |
|
4355
|
10 |
1 |
for (i = 0; i < meta->role_count; i++) { |
|
4356
|
7 |
3 |
if (strEQ(meta->consumed_roles[i]->role_name, role_pv)) { |
|
4376
|
0 |
4 |
if (items != 2) croak("Usage: Object::Proto::before('Class::method', \\&callback)"); |
|
4379
|
4 |
0 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
|
0 |
4 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
4385
|
0 |
4 |
if (!sep) { |
|
4398
|
0 |
4 |
if (!meta) { |
|
4417
|
0 |
4 |
if (items != 2) croak("Usage: Object::Proto::after('Class::method', \\&callback)"); |
|
4420
|
4 |
0 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
|
0 |
4 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
4425
|
0 |
4 |
if (!sep) { |
|
4438
|
0 |
4 |
if (!meta) { |
|
4457
|
0 |
2 |
if (items != 2) croak("Usage: Object::Proto::around('Class::method', \\&callback)"); |
|
4460
|
2 |
0 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
|
0 |
2 |
if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVCV) { |
|
4465
|
0 |
2 |
if (!sep) { |
|
4478
|
0 |
2 |
if (!meta) { |
|
4498
|
0 |
8 |
if (items < 1) croak("Usage: Object::Proto::singleton($class)"); |
|
4503
|
0 |
8 |
if (!meta) { |