Branch Coverage

lib/Su.pm
Criterion Covered Total %
branch 158 236 66.9


line true false branch
293 0 13 if $defs
294 0 13 if $template
295 0 13 if $model
298 5 8 if ($base)
305 5 8 if ($base or $template or $model or $defs) { }
338 31 5 if ref $_[0] eq 'Su'
340 13 23 $$self{'base'} ? :
341 0 36 $$self{'defs'} ? :
351 33 3 unless ($b_force_reload)
354 33 0 if ($self) { }
355 21 12 if (defined $$self{'defs_module_name'} and $$self{'defs_module_name'} eq $defs_mod_name)
361 0 0 if (defined $defs_module_name and $defs_module_name eq $defs_mod_name)
368 15 0 if ($self) { }
382 3 12 if ($b_force_reload)
390 15 0 if ($self) { }
412 0 4 if ref $_[0] eq 'Su'
414 2 2 if (ref $_[0] eq 'HASH') { }
440 0 16 if (scalar @_ == 1) { }
443 0 0 if (ref $tmp_ref eq 'SCALAR')
615 39 6 if ref $_[0] eq 'Su'
621 39 6 $self && eval { do { $self->isa('Su') } } ? :
624 7 36 if $new_comp_id
628 0 43 $$self{'model'} ? :
629 0 43 $$self{'template'} ? :
634 0 1 $$self{'defs_module_name'} ? :
1 42 unless $proc_id
645 42 0 if $self
652 37 5 if ($tmpl_module->can('model'))
655 4 33 if (ref $$info_href{$comp_id}{'model'} eq 'HASH') { }
3 30 elsif (ref $$info_href{$comp_id}{'model'} eq 'ARRAY') { }
669 5 25 if $MODEL_LOCALE
673 30 0 if ($loading_model)
675 3 27 unless $model
678 2 28 if defined $$info_href{$GLOBAL_MODEL_FIELD}
687 3 27 if ($MODEL_KEY_PREFIX or $MODEL_KEY_POSTFIX)
690 1 11 if (exists $$model{$MODEL_KEY_PREFIX . '__' . $key . '__' . $MODEL_KEY_POSTFIX}) { }
3 8 elsif (exists $$model{$MODEL_KEY_PREFIX . '__' . $key}) { }
3 5 elsif (exists $$model{$key . '__' . $MODEL_KEY_POSTFIX}) { }
716 3 39 if ($$self{'just_return_module'})
720 34 5 if ($tmpl_module->can('model'))
721 3 31 if (ref $$info_href{$comp_id}{'model'} eq 'ARRAY')
731 9 0 if ($loaded_model)
745 5 34 if ($$info_href{$comp_id}{'map_filter'})
748 5 0 if (ref $$info_href{$comp_id}{'map_filter'} eq '') { }
0 0 elsif (ref $$info_href{$comp_id}{'map_filter'} eq 'ARRAY') { }
760 2 37 if ($$info_href{$comp_id}{'reduce_filter'})
763 2 0 if (ref $$info_href{$comp_id}{'reduce_filter'} eq '')
769 3 36 if ($$info_href{$comp_id}{'scalar_filter'})
772 3 0 if (ref $$info_href{$comp_id}{'scalar_filter'} eq '') { }
0 0 elsif (ref $$info_href{$comp_id}{'scalar_filter'} eq 'ARRAY') { }
783 3 36 if (@ret_arr)
802 31 1 scalar @single_ret_arr == 1 ? :
32 4 unless $reduce_filter or @scalar_filters
808 2 2 if ($reduce_filter) { }
1 1 elsif (scalar @single_ret_arr == 1) { }
836 39 6 if ref $_[0] eq 'Su'
842 8 37 if ($USE_GLOBAL_SETUP) { }
31 6 elsif ($self and UNIVERSAL::isa($self, 'UNIVERSAL') and $self->isa('Su')) { }
850 25 6 unless ref $comp_id eq 'HASH'
855 6 0 unless (ref $comp_id eq 'HASH')
860 1 5 keys %{$Su::info_href;} ? :
871 7 38 if (ref $comp_id eq 'HASH') { }
25 13 elsif (not $info_href) { }
879 25 0 $$self{'defs_href'} ? :
882 2 43 unless ($$info_href{$comp_id} and (ref $$info_href{$comp_id} eq 'HASH' and keys %{$$info_href{$comp_id};}))
893 7 36 $comp_id eq 'dmy_id' ? :
904 1 0 if ref $_[0] eq 'Su'
906 1 0 if ($self) { }
924 3 0 if ref $_[0] eq 'Su'
942 0 0 if ref $_[0] eq 'Su'
944 0 0 if ($self) { }
959 1 0 if ref $_[0] eq 'Su'
961 1 0 if ($self) { }
976 0 0 if ref $_[0] eq 'Su'
978 0 0 if ($self) { }
1000 0 0 if ref $_[0] eq 'Su'
1003 0 0 unless $pkg
1007 0 0 if ($self) { }
1033 3 0 if ref $_[0] eq 'Su'
1034 3 0 $$self{'base'} ? :
1049 3 0 if ref $_[0] eq 'Su'
1050 3 0 $$self{'base'} ? :
1077 3 0 if ref $_[0] eq 'Su'
1085 0 3 unless $fqcn
1088 3 0 $self ? :
1091 1 2 if ($fqcn =~ /.+Proc$/) { }
1103 3 0 $self ? :
1111 0 3 _is_string($gen_def) ? :
1114 1 0 $self ? :
3 0 if ($gen_def or $self ? $self->_is_defs_exist($defs_fname) : _is_defs_exist($defs_fname)) { }
1123 3 0 if ($self) { }
1195 6 0 if ref $_[0] eq 'Su'
1197 6 0 $self ? :
1203 6 0 if (scalar @_ != 1)
1205 1 5 if ($ret == 0 and not $defs_h{'just_add_entry_if_defs_already_exist'})
1225 6 0 if ref $_[0] eq 'Su'
1233 0 6 unless &open(my $F, '<', $template_fname)
1236 6 0 $self ? :
1253 6 0 if ref $_[0] eq 'Su'
1259 0 6 if (scalar @_ == 1) { }
1270 6 0 $$self{'base'} ? :
1271 0 6 $$self{'defs'} ? :
1276 3 3 if (scalar @arr > 1)
1281 3 3 if ($defs_id =~ m[::|/]) { }
1288 0 6 unless -d $dir
1290 0 6 unless (-d $dir)
1299 3 3 if ($defs_id =~ m[::|/]) { }
1307 3 3 unless ($defs_id =~ /::/)
1321 3 3 if (-f $fpath)
1324 2 1 if ($defs_h{'just_add_entry_if_defs_already_exist'}) { }
1352 1 2 if ($defs_h{'use_proc_name_as_entry_id'})
1363 0 3 $pkg ? :
1386 0 3 if ($arg and ($arg ^ $arg) ne '0' and not ref $arg and $arg ne 'true') { }
1449 0 3 if ref $_[0] eq 'Su'
1479 1 0 if ref $_[0] eq 'Su'
1482 1 0 $$self{'base'} ? :
1483 0 1 $$self{'defs'} ? :
1488 1 0 if ($defs_id =~ m[::|/]) { }