Branch Coverage

blib/lib/Message/String.pm
Criterion Covered Total %
branch 201 222 90.5


line true false branch
135 1 1 wantarray ? :
157 97 279 unless ref $invocant
158 252 24 unless $bool_copy or exists $invocant->{'types'}
160 2 25 unless exists $invocant->{'types'}
174 2 2 if (ref $invocant) { }
176 5 8 unless $key =~ /^(?:template|level|type|id)$/
181 0 2 unless defined $type and exists $types->{$type}
201 1 31 if wantarray
213 67 2 if (@_ > 1 and defined $type)
216 7 60 if (@_ > 2)
217 4 3 if not ref $invocant and $type =~ /^[ACEW]$/
222 1 2 if ref $invocant
226 59 1 if exists $types->{$type}
239 85 2 if (@_ > 1 and defined $type)
242 2 83 if (@_ > 2)
246 2 80 if ($type eq '1' or $type eq '0' or $type eq '')
251 79 1 if exists $types->{$type}
264 68 2 if (@_ > 1 and defined $type)
267 5 63 if (@_ > 2)
271 2 60 if ($type eq '1' or $type eq '0' or $type eq '')
276 59 1 if exists $types->{$type}
289 65 2 if (@_ > 1 and defined $type)
292 3 62 if (@_ > 2)
294 1 2 if length $value > 3
300 61 1 if exists $types->{$type}
312 9 3 if (@_ > 1 and defined $type)
315 3 6 if (@_ > 2)
317 1 2 unless $value
319 1 2 unless ref $value
324 5 1 if (exists $types->{$type})
325 4 1 if wantarray
329 1 3 wantarray ? :
344 4 185 if $types->{$type}{'tlc'}
346 17 4 wantarray ? :
357 29 1 unless @_ > 1
371 30 1 unless @_ > 1
392 23 5 unless @_ > 1
394 2 3 if ($value =~ /^\d+$/) { }
400 2 1 if (length $value > 1)
405 3 0 if index($invocant->_message_types, $value) > -1
408 1 4 if $cur_verbosity < $min_verbosity
420 4 2 unless @_ > 1
547 34 17 if defined $wantarray
548 0 17 if $message->verbosity < $message->_type_level($message->type)
558 34 17 unless $message->_should_be_issued(wantarray)
562 17 0 if exists $types->{$type}
563 0 17 unless $issue_using
574 2 49 if $message->_type_timestamp($message->type)
576 4 47 if $message->_type_tlc($message->type)
578 7 44 if $message->_type_id($message->type)
580 6 45 if (@args) { }
597 1 1 if $timestamp_format eq '1'
637 36 28 unless @_ > 1
640 1 27 if ($value =~ /(^.+):([$short_types])$/)
643 0 28 unless $value and $value =~ /^[\p{Alpha}_\-][\p{Digit}\p{Alpha}_\-]*$/
646 0 28 if exists $bad_identifiers{$value}
647 28 0 if ($message->_update_type_on_id_change)
648 1 27 if ($type) { }
652 1 26 if ($value =~ /[_\d]([$short_types])$/) { }
9 17 elsif ($value =~ /^([$short_types])[_\d]/) { }
662 1 16 if ($value =~ /($long_types)$/) { }
15 1 elsif ($value =~ /^($long_types)/) { }
700 5 17 if ref $export_tags and @$export_tags
702 7 15 if $export_ok
704 8 14 if $export
741 1 7 unless $package->_ensure_namespace_is_exporter($ns)
756 5 2 unless $package->_ensure_namespace_is_exporter($ns)
771 4 1 unless $package->_ensure_namespace_is_exporter($ns)
773 0 1 unless ref $export_tags and @$export_tags
778 1 0 unless defined do { "${ns}::EXPORT_TAGS" }->{$tag}
793 10 10 if $ns eq 'main'
795 1 9 unless $ns->isa('Exporter')
806 1 28 unless @_ > 1
829 28 1 if (@pairs % 2) { }
835 4 25 unless $class->isa(ref $message)
840 0 1 unless $method and not ref $method
841 0 1 unless ref $coderef and ref $coderef eq 'CODE'
854 1 0 exists $message->{'readmode'} ? :
1 1 unless @_ > 1
867 1 1 exists $message->{'response'} ? :
2 1 unless @_ > 1
879 0 0 exists $message->{'output'} ? :
0 51 unless @_ > 1
901 3 28 unless @_ > 1
902 0 28 unless $value
914 224 29 unless @_ > 1
916 1 28 if (length $type > 1)
920 29 0 if ($message->_update_level_on_type_change)
922 0 29 unless defined $level
927 0 29 if exists $message->{'types'}
937 5 35 unless @_ > 1
938 2 33 if ($value =~ /\D/)
940 1 1 if (length $type > 1)
945 0 2 unless defined $value
962 5 1 if /\S/
966 1 3 if (@lines and $id =~ /^[.]+$/) { }
1 2 elsif (@lines and $id =~ /^[+]+$/) { }
1013 1 27 if ($message->type eq 'R' and $message->template =~ /password/is)
1023 16 2 if (@args)
1029 7 41 if ($ref_type) { }
1030 4 3 if ($ref_type eq 'HASH') { }
2 1 elsif ($ref_type eq 'ARRAY') { }
1039 4 2 if @messages
1053 10 31 if ($this_arg eq 'EXPORT') { }
3 28 elsif ($this_arg eq 'EXPORT_OK') { }
9 19 elsif (substr($this_arg, 0, 1) eq ':') { }
1054 2 8 if (@messages)
1070 1 2 if (@messages)
1089 3 6 if @messages
1102 18 1 if (@args) { }
1111 12 3 if (@messages)