Branch Coverage

blib/lib/Mojo/Base/Tiny.pm
Criterion Covered Total %
branch 58 74 78.3


line true false branch
26 0 16 unless my $class = ref $self || $self and $attrs
28 1 15 if ref $value and ref $value ne 'CODE'
30 1 14 if grep {$_ ne 'weak';} keys %kv
33 5 9 if ($kv{'weak'})
35 3 2 unless ($weak_names{$class})
46 1 4 ref $attrs eq 'ARRAY' ? :
49 2 12 ref $attrs eq 'ARRAY' ? :
50 1 14 unless $attr =~ /^[a-zA-Z_]\w*$/u
54 5 9 if ($kv{'weak'}) { }
2 7 elsif (ref $value) { }
2 5 elsif (defined $value) { }
55 3 2 if (ref $value) { }
62 2 3 exists $_[0]{$attr} ? :
5 4 if @_ == 1
64 3 1 if ref($_[0]{$attr} = $_[1])
70 4 3 if @_ == 1
71 2 1 if ref($_[0]{$attr} = $_[1])
79 2 2 exists $_[0]{$attr} ? :
4 2 if @_ == 1
87 6 3 exists $_[0]{$attr} ? :
9 2 if @_ == 1
95 10 7 if @_ == 1
103 4 10 unless my(@flags) = @_
112 3 10 if ($flag eq '-base') { }
0 10 elsif ($flag eq '-role') { }
0 10 elsif ($flag eq '-async_await') { }
0 10 elsif ($flag eq '-signatures') { }
8 2 elsif (not $flag =~ /^-/u) { }
0 2 elsif ($flag ne '-strict') { }
118 0 0 unless eval "package $caller; use Role::Tiny; 1"
128 0 0 if $] < 5.02
136 1 7 unless $flag->can('new')
147 4 0 @_ > 1 ? :
4 8 @_ ? :
161 0 0 /^\+(.+)$/u ? :
0 0 unless my $class = &Scalar::Util::blessed($self)
165 0 0 /^\+(.+)$/u ? :