Branch Coverage

Clone.xs
Criterion Covered Total %
branch 31 172 18.0


line true false branch
53 0 0 if ( !obj || !SvROK(obj) || !SvOBJECT(SvRV(obj)) )
0 0 if ( !obj || !SvROK(obj) || !SvOBJECT(SvRV(obj)) )
0 0 if ( !obj || !SvROK(obj) || !SvOBJECT(SvRV(obj)) )
57 0 0 if ( ! stash ) return 0;
59 0 0 const char *name = HvNAME(stash);
0 0 const char *name = HvNAME(stash);
0 0 const char *name = HvNAME(stash);
0 0 const char *name = HvNAME(stash);
0 0 const char *name = HvNAME(stash);
0 0 const char *name = HvNAME(stash);
60 0 0 return ( name && strcmp( name, "threads::shared::tie" ) == 0 );
0 0 return ( name && strcmp( name, "threads::shared::tie" ) == 0 );
68 5 0 int recur = depth ? depth - 1 : 0;
75 7 5 while ((next = hv_iternext(self))) {
87 0 0 if (!ref) return NULL;
93 0 0 if (( seen = CLONE_FETCH(ref) )) {
99 0 0 CLONE_STORE(ref, (SV *)clone);
102 0 0 if ( av_len(self) == 0 ) {
104 0 0 if ( elem && SvROK(*elem) && SvTYPE(SvRV(*elem)) == SVt_PVAV ) {
0 0 if ( elem && SvROK(*elem) && SvTYPE(SvRV(*elem)) == SVt_PVAV ) {
0 0 if ( elem && SvROK(*elem) && SvTYPE(SvRV(*elem)) == SVt_PVAV ) {
108 0 0 while ( current && SvROK(current) && SvTYPE( SvRV(current) ) == SVt_PVAV && av_len( (AV*)SvRV(current) ) == 0 ) {
0 0 while ( current && SvROK(current) && SvTYPE( SvRV(current) ) == SVt_PVAV && av_len( (AV*)SvRV(current) ) == 0 ) {
0 0 while ( current && SvROK(current) && SvTYPE( SvRV(current) ) == SVt_PVAV && av_len( (AV*)SvRV(current) ) == 0 ) {
0 0 while ( current && SvROK(current) && SvTYPE( SvRV(current) ) == SVt_PVAV && av_len( (AV*)SvRV(current) ) == 0 ) {
113 0 0 if ( ! next_elem ) break;
115 0 0 current_av = SvROK(current) ? (AV*)SvRV(current) : NULL;
117 0 0 CLONE_STORE( SvRV(*elem), (SV*)new_av );
121 0 0 if ( current ) {
122 0 0 if ( SvROK(current) ) {
130 0 0 else if ( elem ) {
140 0 0 for ( i = 0; i <= arrlen; i++ ) {
142 0 0 if ( svp ) {
144 0 0 if ( ! av_store( clone, i, new_sv ) ) {
157 0 1 if ( depth == 0 ) {
175 3 1 for ( i = 0; i <= arrlen; i++ ) {
177 3 0 if (svp) {
179 0 3 if ( ! av_store( clone, i, new_sv ) ) {
219 0 23 if ( rdepth > MAX_DEPTH ) {
220 0 0 if ( SvTYPE(ref) == SVt_PVAV ) {
232 0 23 if ( ! ref ) {
247 0 23 if ( depth == 0 )
250 23 0 if ( visible && (seen = CLONE_FETCH(ref)) ) {
0 23 if ( visible && (seen = CLONE_FETCH(ref)) ) {
259 0 23 if ( SvTYPE(ref) == SVt_PVLV && SvMAGICAL(ref) ) {
0 0 if ( SvTYPE(ref) == SVt_PVLV && SvMAGICAL(ref) ) {
261 0 0 for ( mg = SvMAGIC(ref); mg; mg = mg->mg_moremagic ) {
262 0 0 if ( (mg->mg_type == PERL_MAGIC_tiedelem || mg->mg_type == PERL_MAGIC_tiedscalar)
0 0 if ( (mg->mg_type == PERL_MAGIC_tiedelem || mg->mg_type == PERL_MAGIC_tiedscalar)
263 0 0 && is_threads_shared_tie(mg->mg_obj) ) {
266 0 0 if ( visible && ref != clone ) CLONE_STORE(ref, clone);
0 0 if ( visible && ref != clone ) CLONE_STORE(ref, clone);
0 0 if ( visible && ref != clone ) CLONE_STORE(ref, clone);
294 0 0 if ( SvIsCOW(ref) && !SvOOK(ref) && SvLEN(ref) > 0 ) {
0 0 if ( SvIsCOW(ref) && !SvOOK(ref) && SvLEN(ref) > 0 ) {
0 0 if ( SvIsCOW(ref) && !SvOOK(ref) && SvLEN(ref) > 0 ) {
295 0 0 if ( CowREFCNT(ref) < (SV_COW_REFCNT_MAX - 1) ) {
312 0 0 if ( SvUTF8(ref) )
366 23 0 if ( visible && ref != clone ) CLONE_STORE( ref, clone );
22 1 if ( visible && ref != clone ) CLONE_STORE( ref, clone );
0 22 if ( visible && ref != clone ) CLONE_STORE( ref, clone );
372 1 22 if ( ref == clone ) return clone;
392 0 22 if (SvMAGICAL(ref)) {
396 0 0 for ( mg = SvMAGIC(ref); mg; mg = mg->mg_moremagic ) {
404 0 0 if ( mg->mg_type == '~' ) {
409 0 0 if ( mg->mg_virtual && mg->mg_virtual->svt_dup && (mg->mg_flags & MGf_DUP) ) {
0 0 if ( mg->mg_virtual && mg->mg_virtual->svt_dup && (mg->mg_flags & MGf_DUP) ) {
0 0 if ( mg->mg_virtual && mg->mg_virtual->svt_dup && (mg->mg_flags & MGf_DUP) ) {
426 0 0 if ( mg->mg_type == PERL_MAGIC_shared_scalar || mg->mg_type == PERL_MAGIC_shared )
0 0 if ( mg->mg_type == PERL_MAGIC_shared_scalar || mg->mg_type == PERL_MAGIC_shared )
430 0 0 if ( mg->mg_obj != NULL ) {
446 0 0 if ( is_threads_shared_tie(mg->mg_obj) ) continue;
460 0 0 if ( mg->mg_len >= 0 ) { /* copy the pv */
461 0 0 if ( mg_ptr ) {
466 0 0 else if ( mg->mg_len == HEf_SVKEY ) {
472 0 0 else if ( mg->mg_len == -1 && mg->mg_type == PERL_MAGIC_utf8 ) { /* copy the cache */
0 0 else if ( mg->mg_len == -1 && mg->mg_type == PERL_MAGIC_utf8 ) { /* copy the cache */
473 0 0 if ( mg->mg_ptr ) {
480 0 0 else if ( mg->mg_ptr != NULL) {
490 0 0 if (( mg = mg_find(clone, 'r') ))
495 22 0 if ( magic_ref ) {
498 5 17 else if ( SvTYPE(ref) == SVt_PVHV )
500 1 16 else if ( SvTYPE(ref) == SVt_PVAV )
503 8 8 else if ( SvROK(ref) ) {
507 1 7 if ( sv_isobject(ref) ) {
510 0 8 if ( SvWEAKREF(ref) ) {