Branch Coverage

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


line true false branch
29 0 16 unless my $class = ref $self || $self and $attrs
31 1 15 if ref $value and ref $value ne 'CODE'
33 1 14 if grep {$_ ne 'weak';} keys %kv
36 5 9 if ($kv{'weak'})
38 3 2 unless ($weak_names{$class})
49 1 4 ref $attrs eq 'ARRAY' ? :
52 2 12 ref $attrs eq 'ARRAY' ? :
53 1 14 unless $attr =~ /^[a-zA-Z_]\w*$/
57 5 9 if ($kv{'weak'}) { }
2 7 elsif (ref $value) { }
2 5 elsif (defined $value) { }
58 3 2 if (ref $value) { }
65 2 3 exists $_[0]{$attr} ? :
5 4 if @_ == 1
67 3 1 if ref($_[0]{$attr} = $_[1])
73 4 3 if @_ == 1
74 2 1 if ref($_[0]{$attr} = $_[1])
82 2 2 exists $_[0]{$attr} ? :
4 2 if @_ == 1
90 6 3 exists $_[0]{$attr} ? :
9 2 if @_ == 1
98 10 7 if @_ == 1
106 4 10 unless my(@flags) = @_
115 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 =~ /^-/) { }
0 2 elsif ($flag ne '-strict') { }
121 0 0 unless eval "package $caller; use Role::Tiny; 1"
131 0 0 if $] < 5.02
139 1 7 unless $flag->can('new')
150 4 0 @_ > 1 ? :
4 8 @_ ? :
164 0 0 /^\+(.+)$/ ? :
0 0 unless my $class = &Scalar::Util::blessed($self)
168 0 0 /^\+(.+)$/ ? :