Condition Coverage

blib/lib/Mojolicious/Plugin/CanonicalURL.pm
Criterion Covered Total %
condition 47 53 88.6


and 3 conditions

line !l l&&!r l&&r condition
135 1 3 13 not defined &Scalar::Util::reftype($inline_code) and $inline_code
146 182 45 31 $captures_allowed and exists $config->{'captures'}
184 4 5 247 $config and !$config_reftype && index($config, '/') == 0 || grep({$config_reftype eq $_;} 'ARRAY', 'HASH', 'REGEXP', 'SCALAR', 'CODE')
186 0 209 39 defined $config_reftype and $config_reftype eq 'SCALAR'
0 118 91 defined $config_reftype and $config_reftype eq 'ARRAY'
0 76 42 defined $config_reftype and $config_reftype eq 'HASH'
202 112 32 2 not defined $reftype and index($_, '/') != 0
205 32 88 24 defined $reftype and $reftype eq 'SCALAR'
209 32 75 37 defined $reftype and $reftype eq 'HASH'
294 37 0 32 grep {not defined &Scalar::Util::reftype($_);} @$config and not $path_with_no_slashes_at_the_end_declared

or 2 conditions

line l !l condition
179 224 32 &Scalar::Util::reftype($config) || ''

or 3 conditions

line l !l&&r !l&&!r condition
116 0 0 308 not defined &Scalar::Util::reftype($config) or &Scalar::Util::reftype($config) ne 'HASH'
184 26 222 4 !$config_reftype && index($config, '/') == 0 || grep({$config_reftype eq $_;} 'ARRAY', 'HASH', 'REGEXP', 'SCALAR', 'CODE')
195 34 12 102 not defined $reftype or $reftype eq 'CODE'
46 37 65 not defined $reftype or $reftype eq 'CODE' or $reftype eq 'HASH'
49 39 26 not defined $reftype or $reftype eq 'CODE' or $reftype eq 'HASH' or $reftype eq 'REGEXP'
76 24 2 not defined $reftype or $reftype eq 'CODE' or $reftype eq 'HASH' or $reftype eq 'REGEXP' or $reftype eq 'SCALAR'
307 9 2 36 $reftype eq 'REGEXP' or $reftype eq 'HASH'