Branch Coverage

blib/lib/Text/Modify/Rule.pm
Criterion Covered Total %
branch 41 78 52.5


line true false branch
38 5 6 if ($opts{'debug'})
40 10 1 if ($opts{'replace'}) { }
0 1 elsif ($opts{'insert'}) { }
1 0 elsif ($opts{'delete'}) { }
0 0 elsif ($opts{'move'}) { }
42 10 0 if (defined $opts{'with'})
46 1 9 if ($$self{'replacetype'} eq 'wildcard') { }
2 7 elsif ($$self{'replacetype'} eq 'string') { }
56 24 56 if defined $opts{$_}
63 10 0 $$self{'ignorecase'} ? :
67 0 0 if (defined $opts{'at'})
74 0 0 if defined $opts{$_}
84 0 3 if defined $opts{$_}
90 0 0 if (defined $opts{'to'})
96 0 0 if defined $opts{$_}
100 0 11 unless ($$self{'type'})
105 1 10 unless (defined $$self{'opts'})
123 0 11 unless ($txt and $txt->isa('Text::Buffer'))
128 11 0 defined $$self{'regex'} ? :
10 1 defined $$self{'with'} ? :
139 11 0 if ($$self{'type'} ne 'insert')
142 0 78 if ($$self{'matchcount'} >= $$self{'matchfirst'})
148 12 66 if ($found)
153 0 12 if ($$self{'type'} eq 'delete') { }
0 12 elsif ($$self{'type'} eq 'move') { }
12 0 elsif ($$self{'type'} eq 'replace') { }
168 0 0 if ($$self{'to'} eq 'top') { }
182 12 0 if ($tmp ne $string)
196 0 11 if ($$self{'type'} eq 'insert')
200 0 0 if ($$self{'at'} eq 'insert') { }
212 1 10 $$self{'ifmissing'} ? :
217 1 10 if ($$self{'ifmissing'} and $$self{'matchcount'} == 0)
221 1 0 if ($$self{'ifmissing'} eq 'insert') { }
0 0 elsif ($$self{'ifmissing'} eq 'append') { }
0 0 elsif ($$self{'ifmissing'} eq 'ignore') { }
0 0 elsif ($$self{'ifmissing'} eq 'error') { }
238 5 6 if ($$self{'_debug'})
252 0 140 if ($#_ == -1) { }
64 76 elsif ($$self{'_debug'}) { }