| blib/lib/Mojolicious/Plugin/Localize.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 50 | 62 | 80.6 |
| line | l | !l | condition | |
|---|---|---|---|---|
| 520 | 0 | 33 | 0 | do { ref $index eq 'ARRAY' } && do { return @{$index;} } |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 79 | 2 | 2 | 120 | scalar @_ and $_[0] |
| 88 | 112 | 6 | 2 | @_ and @_ % 2 != 0 |
| 168 | 0 | 45 | 4 | ref $_ && ref $_ eq 'ARRAY' |
| 272 | 4 | 1 | 24 | ref $dict_global->{$k} eq ref $dict->{$k} and ref $dict_global->{$k} eq "HASH" |
| 353 | 141 | 9 | 0 | $lazy and $find_pref |
| 150 | 0 | 0 | $lazy and $find_pref and $level >= $#{$key;} | |
| 361 | 131 | 7 | 3 | $dict->{'.'} and not $keys[0] |
| 409 | 231 | 0 | 112 | !ref($match) || ref $match eq 'SCALAR' || ref $match eq 'CODE' and not $find_pref |
| 0 | 225 | 6 | ref $match and $find_pref | |
| 225 | 2 | 4 | ref $match and $find_pref and $level > $#{$key;} | |
| 471 | 169 | 4 | 54 | $pos and $key->[$level] |
| line | l | !l | condition |
|---|---|---|---|
| 30 | 0 | 12 | $ENV{'MOJO_LOCALIZE_DEBUG'} || 0 |
| 94 | 114 | 6 | (_lookup($c, \%stash, $c->stash('localize.dict'), $key, 0) || $default_entry) // "" |
| 117 | 2 | 2 | shift() // "" |
| 128 | 4 | 0 | (_lookup($c, scalar {}, $c->stash('localize.dict'), $key, 0, 1) || $default_entry) // "" |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 94 | 112 | 2 | 6 | _lookup($c, \%stash, $c->stash('localize.dict'), $key, 0) || $default_entry |
| 128 | 4 | 0 | 0 | _lookup($c, scalar {}, $c->stash('localize.dict'), $key, 0, 1) || $default_entry |
| 210 | 2 | 11 | 113 | ref $value or $value =~ /$TEMPLATE_INDICATOR/u |
| 234 | 5 | 41 | 1 | $override or not defined $dict_global->{'_'} |
| 262 | 4 | 30 | 1 | $override or not defined $dict_global->{'-'} |
| 409 | 110 | 2 | 231 | !ref($match) || ref $match eq 'SCALAR' || ref $match eq 'CODE' |