Branch Coverage

blib/lib/Plack/App/OpenVPN/Status.pm
Criterion Covered Total %
branch 40 54 74.0


line true false branch
82 2 6 if ($self->custom_view)
83 1 1 if (ref $self->custom_view eq 'CODE') { }
108 1 6 if (not $self->status_from) { }
112 1 5 if (not -e $self->status_from || -r _) { }
132 0 5 unless open STATUS, '<' . $self->status_from
166 0 8 if ($octets > 1152921504606846976) { }
0 8 elsif ($octets > 1125899906842624) { }
0 8 elsif ($octets > 1099511627776) { }
0 8 elsif ($octets > 1073741824) { }
7 1 elsif ($octets > 1048576) { }
1 0 elsif ($octets > 1024) { }
198 0 28 if /^$/
199 15 13 if /^(OpenVPN|ROUTING TABLE|GLOBAL STATS|Max bcast|END)/
204 3 10 if ($length == 2)
205 0 3 unless $line[0] =~ /^Updated/
210 5 5 if ($length == 5)
211 3 2 if $line[0] =~ /^Common Name/
224 5 0 if ($length == 4)
225 3 2 if $line[0] =~ /^Virtual Address/
251 0 16 if /^$/
252 10 6 if /^(TITLE|HEADER|GLOBAL_STATS|END)/
257 2 4 if ($length == 3)
258 0 2 unless $line[0] =~ /^TIME/
263 2 2 if ($length == 8)
264 0 2 unless $line[0] =~ /^CLIENT_LIST/
277 2 0 if ($length == 6)
278 0 2 unless $line[0] =~ /^ROUTING_TABLE/