Condition Coverage

blib/lib/Mojolicious/Plugin/Piwik.pm
Criterion Covered Total %
condition 39 56 69.6


and 3 conditions

line !l l&&!r l&&r condition
218 4 23 4 not defined $param->{'secure'} and index($url, '/') != 0
219 4 0 0 $url =~ s[^(?:http(s)?:)?//][]iu and $1
274 3 2 1 $param->{'res'} and ref $param->{'res'}
422 2 8 0 ref $res eq 'HASH' and $res->{'error'}

or 2 conditions

line l !l condition
29 13 0 $plugin_param ||= {}
45 2 11 $plugin_param->{'append'} || ''
98 12 12 shift() || $plugin_param->{'site_id'} || 1
132 0 3 $opt{'rel'} //= 'nofollow'
133 2 1 $cb || sub { 'Piwik Opt-Out'; }
137 1 6 $opt{'width'} ||= '600px'
138 0 7 $opt{'height'} ||= '200px'
139 2 5 $opt{'frameborder'} ||= 'no'
141 1 6 $cb || sub { ''; }
162 2 0 shift() // 'unknown'
167 2 0 $plugin_param->{'site_id'} || 1
232 0 2 $param->{'site_id'} || $param->{'idSite'} || $param->{'idsite'} || $plugin_param->{'site_id'} || 1
239 0 9 delete $param->{'token_auth'} || $plugin_param->{'token_auth'} || 'anonymous'

or 3 conditions

line l !l&&r !l&&!r condition
39 1 10 2 $plugin_param->{'embed'} // ($mojo->mode eq 'production' ? 1 : 0)
99 7 26 0 shift() || $plugin_param->{'url'}
214 2 29 0 delete $param->{'url'} || $plugin_param->{'url'}
251 0 4 0 $_->{'ua'} //= $header->user_agent
252 0 4 0 $_->{'urlref'} //= $header->referrer
256 6 1 0 delete $_->{'action_url'} || $c->url_for->to_abs