Branch Coverage

blib/lib/Log/GELF/Util.pm
Criterion Covered Total %
branch 40 48 83.3


line true false branch
121 1 1 unless $version =~ /^1\.1$/
135 1 1 unless $ts =~ /^\d+(?:\.\d+)*$/
151 1 2 unless $line =~ /^\d+$/
167 0 88 if (!$key =~ /^[\w\.\-]+$/)
171 2 86 if ($key eq '_id' or not exists $GELF_MESSAGE_FIELDS{$key} || $key =~ /^_/)
177 5 81 if (exists $GELF_MESSAGE_FIELDS{$key} and $GELF_MESSAGE_FIELDS{$key} == 0)
217 1 4 unless $level =~ /^(?:zlib|gzip)$/
228 3 3 if ($type eq 'zlib')
234 0 6 unless &{$method;}(\$message, \$msgz)
252 2 12 if ($ZLIB_MAGIC eq $msg_magic) { }
11 1 elsif ($GZIP_MAGIC eq $msg_magic) { }
266 0 13 unless &{$method;}(\$message, \$msg)
282 1 9 if (length $message_id != 8)
288 5 2 if ($size > 0 and length $message > $size) { }
297 0 5 if $n_chunks > 128
328 0 0 if (not exists $chunk->{'id'} and exists $chunk->{'sequence_number'} and exists $chunk->{'sequence_count'} and exists $chunk->{'data'})
336 0 297 if ($chunk->{'sequence_number'} > $chunk->{'sequence_count'})
342 12 285 if (scalar grep({defined $_;} @{$accumulator;}) == $chunk->{'sequence_count'}) { }
369 304 0 if (is_chunked($encoded_chunk)) { }
396 17 23 if ($level =~ /$LEVEL_NAME_REGEX/) { }
19 4 elsif ($level =~ /^(?:0|1|2|3|4|5|6|7)$/) { }
415 4 12 unless $size =~ /^(?:lan|wan|\d+)$/i
436 3 9 if ($size eq 'wan') { }
2 7 elsif ($size eq 'lan') { }