Branch Coverage: lib/Message/String.pm

# Branch Coverage

File: | lib/Message/String.pm
Coverage: | 90.6%

line | % | coverage | branch
--- | --- | --- | ---
136 | 100 | T | F | wantarray ? :
158 | 100 | T | F | unless ref $invocant
159 | 100 | T | F | unless $bool_copy or exists $$invocant{'types'}
160 | 100 | T | F | unless exists $$invocant{'types'}
175 | 100 | T | F | if (ref $invocant) { }
177 | 100 | T | F | unless $key =~ /^(?:template|level|type|id)$/
180 | 50 | T | F | unless defined $type and exists $$types{$type}
202 | 100 | T | F | if wantarray
214 | 100 | T | F | if (@_ > 1 and defined $type)
217 | 100 | T | F | if (@_ > 2)
218 | 100 | T | F | if not ref $invocant and $type =~ /^[ACEW]$/
222 | 100 | T | F | if ref $invocant
226 | 100 | T | F | if exists $$types{$type}
240 | 100 | T | F | if (@_ > 1 and defined $type)
243 | 100 | T | F | if (@_ > 2)
247 | 100 | T | F | if ($type eq '1' or $type eq '0' or $type eq '')
251 | 100 | T | F | if exists $$types{$type}
265 | 100 | T | F | if (@_ > 1 and defined $type)
268 | 100 | T | F | if (@_ > 2)
272 | 100 | T | F | if ($type eq '1' or $type eq '0' or $type eq '')
276 | 100 | T | F | if exists $$types{$type}
290 | 100 | T | F | if (@_ > 1 and defined $type)
293 | 100 | T | F | if (@_ > 2)
295 | 100 | T | F | if length $value > 3
300 | 100 | T | F | if exists $$types{$type}
313 | 100 | T | F | if (@_ > 1 and defined $type)
316 | 100 | T | F | if (@_ > 2)
318 | 100 | T | F | unless $value
320 | 100 | T | F | unless ref $value
325 | 100 | T | F | if (exists $$types{$type})
326 | 100 | T | F | if wantarray
330 | 100 | T | F | wantarray ? :
344 | 100 | T | F | if $$types{$type}{'tlc'}
347 | 100 | T | F | wantarray ? :
358 | 100 | T | F | unless @_ > 1
372 | 100 | T | F | unless @_ > 1
393 | 100 | T | F | unless @_ > 1
395 | 100 | T | F | if ($value =~ /^\d+$/) { }
401 | 100 | T | F | if (length $value > 1)
405 | 50 | T | F | if index($invocant->_message_types, $value) > -1
409 | 100 | T | F | if $cur_verbosity < $min_verbosity
421 | 100 | T | F | unless @_ > 1
548 | 100 | T | F | if defined $wantarray
549 | 50 | T | F | if $message->verbosity < $message->_type_level($message->type)
559 | 100 | T | F | unless $message->_should_be_issued(wantarray)
562 | 50 | T | F | if exists $$types{$type}
564 | 50 | T | F | unless $issue_using
575 | 100 | T | F | if $message->_type_timestamp($message->type)
577 | 100 | T | F | if $message->_type_tlc($message->type)
579 | 100 | T | F | if $message->_type_id($message->type)
581 | 100 | T | F | if (@args) { }
598 | 100 | T | F | if $timestamp_format eq '1'
637 | 100 | T | F | unless @_ > 1
641 | 100 | T | F | if ($value =~ /(^.+):([$short_types])$/)
644 | 50 | T | F | unless $value and $value =~ /^[\p{Alpha}_\-][\p{Digit}\p{Alpha}_\-]*$/
646 | 50 | T | F | if exists $bad_identifiers{$value}
648 | 50 | T | F | if ($message->_update_type_on_id_change)
649 | 100 | T | F | if ($type) { }
653 | 100 | T | F | if ($value =~ /[_\d]([$short_types])$/) { }
| 100 | T | F | elsif ($value =~ /^([$short_types])[_\d]/) { }
663 | 100 | T | F | if ($value =~ /($long_types)$/) { }
| 100 | T | F | elsif ($value =~ /^($long_types)/) { }
701 | 100 | T | F | if ref $export_tags and @$export_tags
703 | 100 | T | F | if $export_ok
705 | 100 | T | F | if $export
742 | 100 | T | F | unless $package->_ensure_namespace_is_exporter($ns)
757 | 100 | T | F | unless $package->_ensure_namespace_is_exporter($ns)
772 | 100 | T | F | unless $package->_ensure_namespace_is_exporter($ns)
774 | 50 | T | F | unless ref $export_tags and @$export_tags
779 | 50 | T | F | unless defined ${"${ns}::EXPORT_TAGS";}{$tag}
794 | 100 | T | F | if $ns eq 'main'
796 | 100 | T | F | unless $ns->isa('Exporter')
806 | 100 | T | F | unless @_ > 1
830 | 100 | T | F | if (@pairs % 2) { }
836 | 100 | T | F | unless $class->isa(ref $message)
841 | 50 | T | F | unless $method and not ref $method
842 | 50 | T | F | unless ref $coderef and ref $coderef eq 'CODE'
855 | 50 | T | F | exists $$message{'readmode'} ? :
| 100 | T | F | unless @_ > 1
867 | 100 | T | F | exists $$message{'response'} ? :
| 100 | T | F | unless @_ > 1
879 | 0 | T | F | exists $$message{'output'} ? :
| 50 | T | F | unless @_ > 1
901 | 100 | T | F | unless @_ > 1
903 | 50 | T | F | unless $value
914 | 100 | T | F | unless @_ > 1
917 | 100 | T | F | if (length $type > 1)
921 | 50 | T | F | if ($message->_update_level_on_type_change)
923 | 50 | T | F | unless defined $level
927 | 50 | T | F | if exists $$message{'types'}
938 | 100 | T | F | unless @_ > 1
939 | 100 | T | F | if ($value =~ /\D/)
941 | 100 | T | F | if (length $type > 1)
946 | 50 | T | F | unless defined $value
963 | 100 | T | F | if /\S/
967 | 100 | T | F | if (@lines and $id =~ /^[.]+$/) { }
| 100 | T | F | elsif (@lines and $id =~ /^[+]+$/) { }
1014 | 100 | T | F | if ($message->type eq 'R' and $message->template =~ /password/is)
1024 | 100 | T | F | if (@args)
1030 | 100 | T | F | if ($ref_type) { }
1031 | 100 | T | F | if ($ref_type eq 'HASH') { }
| 100 | T | F | elsif ($ref_type eq 'ARRAY') { }
1040 | 100 | T | F | if @messages
1054 | 100 | T | F | if ($this_arg eq 'EXPORT') { }
| 100 | T | F | elsif ($this_arg eq 'EXPORT_OK') { }
| 100 | T | F | elsif (substr($this_arg, 0, 1) eq ':') { }
| 100 | T | F | elsif ($this_arg eq 'void') { }
1055 | 100 | T | F | if (@messages)
1071 | 100 | T | F | if (@messages)
1090 | 100 | T | F | if @messages
1106 | 100 | T | F | if (@args) { }
1115 | 100 | T | F | if (@messages)