Branch Coverage

blib/lib/Thread/Queue/MaxSize.pm
Criterion Covered Total %
branch 31 46 67.3


line true false branch
18 0 17 if ($config and !ref($config) || ref $config ne 'HASH')
24 17 0 $config ? :
33 17 0 $config ? :
44 0 84 if ($$self{'ENDED'})
52 81 3 if (defined $$self{'MAXSIZE'} and $$self{'MAXSIZE'} > 0)
53 35 46 if (scalar(@{$queue;}) + scalar(@_) > $$self{'MAXSIZE'} and $$self{'ON_MAXSIZE'} =~ /^(die|warn_and_reject|silent_reject|warn_and_truncate)$/xi)
55 11 24 if ($1 =~ /^warn_and_truncate$/xi) { }
11 13 elsif ($1 =~ /^silent_reject$/xi) { }
11 2 elsif ($1 =~ /^warn_and_reject$/xi) { }
2 0 elsif ($1 =~ /^die$/xi) { }
79 60 0 if push @{$queue;}, map({shared_clone($_);} @_)
87 0 9 if ($$self{'ENDED'})
97 0 5 unless @_
100 0 5 if ($index < 0)
102 0 0 if $index < 0
112 5 0 if (defined $$self{'MAXSIZE'} and $$self{'MAXSIZE'} > 0)
113 4 1 if (scalar(@{$queue;}) + scalar(@_) + scalar(@tmp) > $$self{'MAXSIZE'} and $$self{'ON_MAXSIZE'} =~ /^(die|warn_and_reject|silent_reject|warn_and_truncate)$/xi)
115 1 3 if ($1 =~ /^warn_and_truncate$/xi) { }
1 2 elsif ($1 =~ /^silent_reject$/xi) { }
1 1 elsif ($1 =~ /^warn_and_reject$/xi) { }
1 0 elsif ($1 =~ /^die$/xi) { }
158 0 15 if (defined $maxsize and !looks_like_number($maxsize) || int $maxsize != $maxsize || $maxsize < 1)
172 0 17 if (defined $on_maxsize and not $on_maxsize =~ /^(?:die|warn_and_reject|silent_reject|warn_and_truncate|silent_truncate)$/xi)