Condition Coverage

blib/lib/Class/MakeMethods/Utility/TextBuilder.pm
Criterion Covered Total %
condition 5 6 83.3


and 3 conditions

line !l l&&!r l&&r condition
58 0 1233 1632 length $text and $text =~ s/ $expr_expr /my $substitute = $rules{$1}; if (not ref $substitute) { $substitute; } elsif (ref $substitute eq 'CODE') { &{$substitute;}(); } else { croak("Unknown type of substitution rule: '${substitute}'"); } ;/egsx

or 3 conditions

line l !l&&r !l&&!r condition
58 1632 804 429 length $text and $text =~ s/ $expr_expr /my $substitute = $rules{$1}; if (not ref $substitute) { $substitute; } elsif (ref $substitute eq 'CODE') { &{$substitute;}(); } else { croak("Unknown type of substitution rule: '${substitute}'"); } ;/egsx or $text =~ s[ $block_expr ][my $substitute = $rules{$1 . '{}'}; my $contents = $2; if (not ref $substitute) { $substitute =~ s/\*/$contents/g; $substitute; } elsif (ref $substitute eq 'HASH') { $$substitute{$contents}; } elsif (ref $substitute eq 'CODE') { &{$substitute;}($contents); } else { croak("Unknown type of substitution rule: '${substitute}'"); } ;]egsx