Branch Coverage

lib/Class/Plain.xs
Criterion Covered Total %
branch 68 130 52.3


line true false branch
38 46 1 if(!SvROK(self) || !SvOBJECT(SvRV(self)))
0 46 if(!SvROK(self) || !SvOBJECT(SvRV(self)))
57 0 21 if(SvROK(self))
76 203 0 if(!svp || !*svp || !SvOK(*svp))
203 0 if(!svp || !*svp || !SvOK(*svp))
0 203 if(!svp || !*svp || !SvOK(*svp))
0 0 if(!svp || !*svp || !SvOK(*svp))
0 0 if(!svp || !*svp || !SvOK(*svp))
78 203 0 return (ClassMeta *)(intptr_t)SvIV(*svp);
83 103 3 if(!svp || !*svp)
103 0 if(!svp || !*svp)
86 0 103 if(SvOK(*svp) && SvIV(*svp))
0 0 if(SvOK(*svp) && SvIV(*svp))
0 0 if(SvOK(*svp) && SvIV(*svp))
103 0 if(SvOK(*svp) && SvIV(*svp))
0 103 if(SvOK(*svp) && SvIV(*svp))
115 14 23 if(!SvPOK(sv) || !SvCUR(sv))
12 2 if(!SvPOK(sv) || !SvCUR(sv))
121 12 0 while(*src && isSPACE(*src))
0 12 while(*src && isSPACE(*src))
124 0 12 if(src > dst) {
131 12 0 while(src > dst && isSPACE(*src))
0 12 while(src > dst && isSPACE(*src))
157 0 40 if(!packagename)
164 1 39 if (type == 1) {
169 10 30 if(nattrs) {
171 11 10 for(i = 0; i < nattrs; i++) {
192 40 0 if(lex_consume_unichar('{')) {
196 0 0 else if(lex_consume_unichar(';')) {
214 40 0 if (exists_class_block) {
221 0 40 if(!lex_consume_unichar('}'))
227 0 40 for (int32_t i = 0; i < av_count(role_names); i++) {
0 40 for (int32_t i = 0; i < av_count(role_names); i++) {
229 0 0 if (role_name) {
234 0 0 sv_catpv(sv_source_code, SvPV_nolen(class->name));
237 0 0 sv_catpv(sv_source_code, SvPV_nolen(role_name));
242 0 0 Perl_eval_pv(aTHX_ SvPV_nolen(sv_source_code), 1);
283 2 38 if(!S_have_comp_class(aTHX))
286 0 38 if(!sv_eq(PL_curstname, S_comp_class(aTHX)->name))
300 24 14 if(nattrs) {
301 26 24 while(argi < (nattrs+2)) {
309 26 0 if(attrval)
334 1 65 if(!S_have_comp_class(aTHX))
337 0 65 if(!sv_eq(PL_curstname, S_comp_class(aTHX)->name))
366 0 18 MethodMeta* comp_method = NUM2PTR(MethodMeta* , SvUV(*hv_fetchs(ctx->moddata, "Class::Plain/comp_method", 0)));
369 18 0 for(def = method_attributes; def->attrname; def++) {
370 0 18 if(!strEQ(SvPVX(attr), def->attrname))
375 0 18 (*def->apply)(aTHX_ comp_method, SvPOK(val) ? SvPVX(val) : NULL, def->applydata);
386 0 65 MethodMeta* comp_method = NUM2PTR(MethodMeta* , SvUV(*hv_fetchs(ctx->moddata, "Class::Plain/comp_method", 0)));
387 18 47 if(comp_method->is_common) {
389 0 18 if (!(var_index == 1)) {
395 0 47 if(var_index != 1) {
405 0 65 MethodMeta* comp_method = NUM2PTR(MethodMeta* , SvUV(*hv_fetchs(ctx->moddata, "Class::Plain/comp_method", 0)));
410 61 4 if (ctx->body) {
411 18 43 if(comp_method->is_common) {
435 0 65 comp_method = NUM2PTR(MethodMeta* , SvUV(tmpsv));
439 61 4 if(ctx->cv) {
443 62 3 if(ctx->name && (ctx->actions & XS_PARSE_SUBLIKE_ACTION_INSTALL_SYMBOL)) {
62 0 if(ctx->name && (ctx->actions & XS_PARSE_SUBLIKE_ACTION_INSTALL_SYMBOL)) {
448 62 0 if (!ctx->body) {
451 0 62 if (method->class->is_role) {
457 0 0 sv_catpv(sv_source_code, SvPV_nolen(method->class->name));
460 0 0 sv_catpv(sv_source_code, SvPV_nolen(method->name));
465 0 0 Perl_eval_pv(aTHX_ SvPV_nolen(sv_source_code), 1);
491 0 0 if(!PL_parser) {