| blib/lib/Mojolicious/Plugin/Piwik.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 40 | 58 | 68.9 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 222 | 4 | 23 | 4 | not defined $param->{'secure'} and index($url, "/") != 0 |
| 223 | 4 | 0 | 0 | $url =~ s[^(?:http(s)?:)?//][]iu and $1 |
| 278 | 3 | 2 | 1 | $param->{'res'} and ref $param->{'res'} |
| 426 | 2 | 8 | 0 | ref $res eq "HASH" and $res->{'error'} |
| line | l | !l | condition |
|---|---|---|---|
| 29 | 13 | 0 | $plugin_param ||= {} |
| 45 | 2 | 11 | $plugin_param->{'append'} || '' |
| 100 | 12 | 12 | shift() || $plugin_param->{'site_id'} || 1 |
| 134 | 0 | 3 | $opt{'rel'} //= "nofollow" |
| 135 | 2 | 1 | $cb || sub { 'Piwik Opt-Out'; } |
| 139 | 1 | 6 | $opt{'width'} ||= "600px" |
| 140 | 0 | 7 | $opt{'height'} ||= "200px" |
| 141 | 2 | 5 | $opt{'frameborder'} ||= "no" |
| 143 | 1 | 6 | $cb || sub { ''; } |
| 164 | 2 | 0 | shift() // "unknown" |
| 169 | 2 | 0 | $plugin_param->{'site_id'} || 1 |
| 218 | 0 | 31 | delete $param->{'send_image'} || '0' |
| 236 | 0 | 2 | $param->{'site_id'} || $param->{'idSite'} || $param->{'idsite'} || $plugin_param->{'site_id'} || 1 |
| 243 | 0 | 9 | delete $param->{'token_auth'} || $plugin_param->{'token_auth'} || 'anonymous' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 39 | 1 | 10 | 2 | $plugin_param->{'embed'} // ($mojo->mode eq "production" ? 1 : 0) |
| 101 | 7 | 26 | 0 | shift() || $plugin_param->{'url'} |
| 216 | 2 | 29 | 0 | delete $param->{'url'} || $plugin_param->{'url'} |
| 255 | 0 | 4 | 0 | $_->{'ua'} //= $header->user_agent |
| 256 | 0 | 4 | 0 | $_->{'urlref'} //= $header->referrer |
| 260 | 6 | 1 | 0 | delete $_->{'action_url'} || $c->url_for->to_abs |