Branch Coverage

blib/lib/Word/Rhymes.pm
Criterion Covered Total %
branch 77 90 85.5


line true false branch
55 1 27 unless (defined $word)
59 1 26 if (defined $context and not $context =~ /^\w+$/)
65 0 26 unless ($self->file)
70 26 0 if ($self->file or $response->is_success) { }
74 26 0 if ($self->file) { }
77 0 26 unless open my $fh, '<', $self->file
90 2 24 if $self->return_raw
102 17 105 if (defined $file)
103 2 15 unless -e $file
104 2 13 unless -f $file
113 1006 3 if (defined $max)
114 2 1004 unless $max =~ /^\d+$/
115 4 1000 if ($max < 1 or $max > 1000)
132 1615 8644 if (defined $min)
133 2 1613 unless $min =~ /^-?\d+$/
134 4 1609 if ($min < 0 or $min > 1000000)
151 110 9509 if (defined $min)
152 2 108 unless $min =~ /^-?\d+$/
153 4 104 if ($min < 1 or $min > 100)
170 3 26 if (defined $bool)
181 0 0 defined $context ? :
191 0 0 $column_width > 15 ? :
196 0 0 if $_ % $columns == 0 and $_ != 0
207 2 26 if (defined $ret)
216 7 287 if (defined $sort_by)
217 1 6 unless (grep /^$sort_by$/, ('score_desc', 'score_asc', 'alpha_desc', 'alpha_asc'))
221 4 2 if ($sort_by =~ /^alpha/) { }
2 0 elsif ($sort_by =~ /^score/) { }
222 2 2 $sort_by =~ /desc/ ? :
227 0 2 $sort_by =~ /desc/ ? :
242 15 21 if exists $args->{'file'}
245 3 31 if exists $args->{'max_results'}
248 3 28 if exists $args->{'min_score'}
251 3 25 if exists $args->{'min_syllables'}
254 2 23 if exists $args->{'multi_word'}
257 1 24 if exists $args->{'return_raw'}
260 3 22 if exists $args->{'sort_by'}
268 1 23 if ($self->multi_word) { }
272 16077 2392 if $_->{'score'}
282 6497 2146 if $_->{'score'} >= $self->min_score
286 10 90 if ($self->sort_by == 2) { }
10 80 elsif ($self->sort_by == 3) { }
70 10 elsif ($self->sort_by == 0) { }
10 0 elsif ($self->sort_by == 1) { }
307 1 1 if (defined $context) { }