Branch Coverage

XS.xs
Criterion Covered Total %
branch 178 328 54.2


line true false branch
162 2 24 if (strEQ(vartype, "SCALAR")) {
165 1 23 else if (strEQ(vartype, "ARRAY")) {
168 3 20 else if (strEQ(vartype, "HASH")) {
171 20 0 else if (strEQ(vartype, "CODE")) {
174 0 0 else if (strEQ(vartype, "IO")) {
188 78 0 buf = SvPV(package, len);
207 0 566 if (!SvCUR(variable))
212 566 0 varpv = SvPV_nolen(varspec->name);
241 0 0 if (!val)
247 0 0 if (!val)
250 0 0 varspec->type = string_to_vartype(SvPV_nolen(HeVAL(val)));
255 566 0 if (strstr(SvPV_nolen(varspec->name), "::")) {
3 563 if (strstr(SvPV_nolen(varspec->name), "::")) {
262 223 4 svtype sv_type = SvROK(value) ? SvTYPE(SvRV(value)) : SVt_NULL;
270 13 2 return SVT_SCALAR(sv_type) && sv_type != SVt_PVGV;
12 1 return SVT_SCALAR(sv_type) && sv_type != SVt_PVGV;
289 0 587 PUSHMARK(SP);
290 0 587 XPUSHs(self);
307 0 85 PUSHMARK(SP);
308 0 85 XPUSHs(self);
325 226 0 name_pv = SvPV(name, name_len);
326 225 1 if (!HvENAME(stash)) {
225 0 if (!HvENAME(stash)) {
225 0 if (!HvENAME(stash)) {
0 225 if (!HvENAME(stash)) {
0 225 if (!HvENAME(stash)) {
225 0 if (!HvENAME(stash)) {
0 225 if (!HvENAME(stash)) {
336 3 0 if (strEQ(&name_pv[1], "SA")) {
339 0 3 av = GvAVn(gv);
345 0 0 if (strEQ(&name_pv[1], "VERLOAD")) {
348 0 0 hv = GvHVn(gv);
362 10 0 if (entry) {
364 0 10 if (isGV(glob)) {
371 10 0 if (HeVAL(entry)) {
410 227 0 if (entry && isGV(HeVAL(entry))) {
11 216 if (entry && isGV(HeVAL(entry))) {
413 216 0 else if (entry) {
416 216 0 if (HeVAL(entry)) {
425 5 222 if (!initial) {
428 218 4 else if (SvROK(initial)) {
438 14 0 GvSetSV(glob, val);
441 4 0 GvSetAV(glob, val);
444 7 0 GvSetHV(glob, val);
447 200 0 GvSetCV(glob, val);
450 2 0 GvSetIO(glob, val);
0 2 GvSetIO(glob, val);
0 0 GvSetIO(glob, val);
2 0 GvSetIO(glob, val);
484 1 0 return GvIOOK(glob) ? 1 : 0;
0 1 return GvIOOK(glob) ? 1 : 0;
0 0 return GvIOOK(glob) ? 1 : 0;
1 0 return GvIOOK(glob) ? 1 : 0;
0 1 return GvIOOK(glob) ? 1 : 0;
500 16 260 entry = hv_fetch_ent(namespace, variable->name,
7 9 entry = hv_fetch_ent(namespace, variable->name,
503 7 269 if (!entry)
507 10 259 if (!isGV(glob))
510 16 253 if (vivify && !_slot_exists(glob, variable->type)) {
4 12 if (vivify && !_slot_exists(glob, variable->type)) {
524 11 0 return (SV*)GvIO(glob);
0 11 return (SV*)GvIO(glob);
0 0 return (SV*)GvIO(glob);
11 0 return (SV*)GvIO(glob);
541 78 3 if (SvPOK(package)) {
542 5 73 if (!_is_valid_module_name(package))
543 5 0 croak("%s is not a module name", SvPV_nolen(package));
547 0 73 if (!hv_store(instance, "name", 4, SvREFCNT_inc_simple_NN(package), 0)) {
553 2 1 else if (SvROK(package) && SvTYPE(SvRV(package)) == SVt_PVHV) {
1 1 else if (SvROK(package) && SvTYPE(SvRV(package)) == SVt_PVHV) {
560 0 1 if (!hv_store(instance, "namespace", 9, SvREFCNT_inc_simple_NN(package), 0)) {
581 1 85 if (!sv_isobject(self))
583 85 0 if ((slot = hv_fetch_ent((HV*)SvRV(self), name_key, 0, name_hash))) {
599 0 584 if (!sv_isobject(self))
606 513 71 if (slot) {
614 71 0 namespace = gv_stashpv(SvPV_nolen(package_name), GV_ADD);
617 0 71 if (!hv_store((HV*)SvRV(self), "namespace", 9, nsref, 0)) {
634 227 1 if (initial && !_valid_for_type(initial, variable.type))
5 222 if (initial && !_valid_for_type(initial, variable.type))
635 0 5 croak("%s is not of type %s",
638 222 1 if (items > 2 && (PL_perldb & 0x10) && variable.type == VAR_CODE) {
14 208 if (items > 2 && (PL_perldb & 0x10) && variable.type == VAR_CODE) {
14 0 if (items > 2 && (PL_perldb & 0x10) && variable.type == VAR_CODE) {
645 0 14 if ((items - 3) % 2)
648 3 14 for (i = 3; i < items; i += 2) {
650 3 0 key = SvPV_nolen(ST(i));
651 1 2 if (strEQ(key, "filename")) {
652 0 1 if (!SvPOK(ST(i + 1)))
654 1 0 filename = SvPV_nolen(ST(i + 1));
656 1 1 else if (strEQ(key, "first_line_num")) {
657 0 1 if (!SvIOK(ST(i + 1)))
659 1 0 first_line_num = SvIV(ST(i + 1));
661 1 0 else if (strEQ(key, "last_line_num")) {
662 0 1 if (!SvIOK(ST(i + 1)))
664 1 0 last_line_num = SvIV(ST(i + 1));
668 1 13 if (!filename || first_line_num == -1) {
0 1 if (!filename || first_line_num == -1) {
669 13 0 if (!filename)
670 13 0 filename = CopFILE(PL_curcop);
671 13 0 if (first_line_num == -1)
675 13 1 if (last_line_num == -1)
685 0 14 if (!hv_store_ent(dbsub, name, dbval, 0)) {
686 0 0 warn("Failed to update $DB::sub for subroutine %s",
714 3 50 if (!entry)
718 50 0 if (isGV(val)) {
731 13 0 RETVAL = GvCVOK(glob) ? 1 : 0;
7 6 RETVAL = GvCVOK(glob) ? 1 : 0;
734 5 0 RETVAL = GvIOOK(glob) ? 1 : 0;
0 5 RETVAL = GvIOOK(glob) ? 1 : 0;
0 0 RETVAL = GvIOOK(glob) ? 1 : 0;
5 0 RETVAL = GvIOOK(glob) ? 1 : 0;
4 1 RETVAL = GvIOOK(glob) ? 1 : 0;
754 7 253 if (!val)
768 0 16 if (!val)
785 0 6 if (!entry)
789 6 0 if (isGV(val)) {
793 0 1 GvSetSV(glob, NULL);
796 0 0 GvSetAV(glob, NULL);
799 0 1 GvSetHV(glob, NULL);
802 0 3 GvSetCV(glob, NULL);
805 1 0 GvSetIO(glob, NULL);
0 1 GvSetIO(glob, NULL);
0 0 GvSetIO(glob, NULL);
1 0 GvSetIO(glob, NULL);
813 0 0 if (variable.type == VAR_CODE) {
823 2 24 if (vartype == VAR_NONE) {
830 2 0 EXTEND(SP, keys);
0 2 EXTEND(SP, keys);
831 13 2 while ((entry = hv_iternext(namespace))) {
851 332 24 while ((val = hv_iternextsv(namespace, &key, &len))) {
858 332 0 if (isGV(gv)) {
861 1 9 if (GvSVOK(val))
862 0 1 mXPUSHp(key, len);
865 2 5 if (GvAVOK(val))
866 0 2 mXPUSHp(key, len);
869 3 12 if (GvHVOK(val))
870 0 3 mXPUSHp(key, len);
873 268 32 if (GvCVOK(val))
207 61 if (GvCVOK(val))
874 0 207 mXPUSHp(key, len);
877 0 0 if (GvIOOK(val))
0 0 if (GvIOOK(val))
0 0 if (GvIOOK(val))
0 0 if (GvIOOK(val))
0 0 if (GvIOOK(val))
878 0 0 mXPUSHp(key, len);
884 0 0 else if (vartype == VAR_CODE) {
885 0 0 mXPUSHp(key, len);
902 20 3 while ((entry = hv_iternext(namespace))) {
915 0 20 if (!isGV(gv)) {
923 0 0 if (GvSVOK(gv))
927 0 0 if (GvAVOK(gv))
931 2 6 if (GvHVOK(gv))
935 6 0 if (GvCVOK(gv))
2 4 if (GvCVOK(gv))
939 0 0 if (GvIOOK(gv))
0 0 if (GvIOOK(gv))
0 0 if (GvIOOK(gv))
0 0 if (GvIOOK(gv))
0 0 if (GvIOOK(gv))
940 0 0 hv_store(ret, key, len, newRV_inc((SV*)GvIO(gv)), 0);
0 0 hv_store(ret, key, len, newRV_inc((SV*)GvIO(gv)), 0);
0 0 hv_store(ret, key, len, newRV_inc((SV*)GvIO(gv)), 0);
0 0 hv_store(ret, key, len, newRV_inc((SV*)GvIO(gv)), 0);