Branch Coverage

blib/lib/MouseX/NativeTraits/MethodProvider/Str.pm
Criterion Covered Total %
branch 38 50 76.0


line true false branch
14 20 22 if (@_ != 2)
17 0 22 unless defined $value
30 0 20 if (@_ != 2)
33 0 20 unless defined $value
46 0 70 if (@_ != 3)
49 10 60 unless Mouse::Util::TypeConstraints::Str($regexp) or Mouse::Util::TypeConstraints::RegexpRef($regexp)
56 20 40 if (ref $replacement eq 'CODE') { }
60 10 30 unless Mouse::Util::TypeConstraints::Str($replacement)
78 0 0 if (@_ != 3)
81 0 0 unless Mouse::Util::TypeConstraints::Str($regexp) or Mouse::Util::TypeConstraints::RegexpRef($regexp)
88 0 0 if (ref $replacement eq 'CODE') { }
92 0 0 unless Mouse::Util::TypeConstraints::Str($replacement)
109 10 70 if (@_ != 2)
112 10 60 unless Mouse::Util::TypeConstraints::Str($regexp) or Mouse::Util::TypeConstraints::RegexpRef($regexp)
128 10 10 if (@_ != 1)
145 10 20 if (@_ != 1)
162 10 10 if (@_ != 1)
177 10 10 if (@_ != 1)
189 10 20 if (@_ != 1)
203 20 130 if (@_ < 2 or @_ > 4)
209 10 120 unless Mouse::Util::TypeConstraints::Int($offset)
213 100 20 if (defined $length) { }
214 10 90 unless Mouse::Util::TypeConstraints::Int($length)
223 60 50 if (defined $replacement) { }
224 10 50 unless Mouse::Util::TypeConstraints::Str($replacement)