Branch Coverage

blib/lib/UI/Various/core.pm
Criterion Covered Total %
branch 161 166 98.1


line true false branch
159 1 337 if ref $pkg
161 1 336 unless $pkg eq "UI::Various::core"
170 297 39 unless ($caller eq "UI::Various")
175 0 297 if (defined caller 4 and (caller 4)[0] eq 'Pod::Coverage') { }
178 1 296 unless defined $$UI{"ui"}
195 36 3 if (defined $rh_options)
197 1 35 unless ref $rh_options eq "HASH"
201 21 36 if ($_ eq 'use') { }
18 18 elsif ($_ eq 'include') { }
9 9 elsif ($_ eq 'log') { }
2 7 elsif ($_ eq 'language') { }
6 1 elsif ($_ eq 'stderr') { }
203 1 20 unless ref $$rh_options{$_} eq "ARRAY"
207 1 4 unless $ui =~ /$re_packages/ou
217 1 8 unless defined $log_level{$level}
224 1 1 unless $$rh_options{$_} =~ /$re_languages/ou
229 1 5 unless $$rh_options{$_} =~ /^[0-3]$/u
241 1 31 if $ENV{"UI"}
245 6 52 if $use =~ /$re_gui_packages/ou and not $ENV{"DISPLAY"}
248 32 20 if (eval "require $uipkg")
252 0 32 $use =~ /$re_gui_packages/ou ? :
262 21 11 if (ref $include eq "")
264 14 7 if ($include eq 'all') { }
2 5 elsif ($include eq 'none') { }
271 1 31 unless ref $include eq "ARRAY"
276 1 170 unless (eval "require $_")
297 5 1 if (defined $new_language)
299 2 3 if (not $new_language =~ /$re_languages/ou) { }
328 15 1 if (defined $new_level)
331 14 1 if (defined $_) { }
356 61 2 if (defined $new_value)
358 1 60 if (not $new_value =~ /^[0-3]$/u) { }
364 2 58 if ($new_value == 1)
366 0 2 $$UI{'is_gui'} ? :
368 14 46 if ($new_value != $$UI{"stderr"})
370 5 9 if ($$UI{"stderr"} == 0 and not defined $orgerr)
372 1 4 unless (open $orgerr, ">&", \*STDERR)
380 6 7 $new_value == 0 ? :
384 4 6 $new_value == 2 ? :
3 10 $new_value == 3 ? :
386 0 13 if ($rc == 0)
395 3 10 if ($$UI{"stderr"} == 2 and $new_value == 0)
532 36 82 if $$UI{"log"} < $level
536 81 1 unless $_ eq $message_id
537 61 21 if ($level < 3 and not $_ =~ /\n\z/u) { }
575 2 335 unless ($level =~ /^\d$/u and $level > 0)
580 332 3 if $$UI{"log"} < $level + 3
614 293 5 if (defined $$UI{"T"}{$message_id} and $$UI{"T"}{$message_id} ne "")
619 2 3 if ($$UI{"language"} ne "en")
623 1 1 if defined $UI::Various::language::en::T{$message_id}
692 1 161 unless ref $attributes eq "HASH"
695 1 160 unless ref $re_allowed_parameters eq ""
698 1 158 unless $self->isa((caller 0)[0])
708 24 134 if (@_ == 1) { }
1 133 elsif (@_ % 2 != 0) { }
710 22 2 if (ref $_[0] eq 'HASH') { }
1 1 elsif (ref $_[0] eq '') { }
731 1 156 unless $key =~ /$re_allowed_parameters/u
734 2 154 if ($self->can("_$key")) { }
153 1 elsif ($self->can($key)) { }
818 3 4362 unless $self->isa((caller 0)[0])
821 1 4361 if defined $sub_set and ref $sub_set ne "CODE"
826 289 4072 if (exists $_[0])
829 3 286 ref $val eq 'SCALAR' ? :
830 201 88 if (defined $sub_set)
831 7 193 unless defined &$sub_set($self, @_)
832 3 278 if (ref $val eq 'SCALAR') { }
836 0 3 if $self->can("_reference")
844 10 4343 ref $$self{$attribute} eq 'SCALAR' ? :
918 1 6 unless $self->isa((caller 0)[0])
921 1 5 if defined $sub_set and ref $sub_set ne "CODE"
927 2 3 ref $val eq 'SCALAR' ? :
928 3 2 if (defined $sub_set)
929 1 2 unless defined &$sub_set($self, @_)
930 2 2 if (ref $val eq 'SCALAR') { }
934 1 1 if $self->can("_reference")
941 2 2 ref $$self{$attribute} eq 'SCALAR' ? :
986 1 616 unless $self->isa((caller 0)[0])
992 3 613 ref $$self{$attribute} eq 'SCALAR' ? :
1045 1 23 unless $self->isa((caller 0)[0])
1050 11 12 if (exists $_[0])
1052 4 7 unless (ref $_[0] eq "SCALAR")
1061 1 6 if $self->can("_reference")