Branch Coverage

blib/lib/Message/String.pm
Criterion Covered Total %
branch 201 226 88.9


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
518 1 0 if ($message->{'readmode'})
523 0 1 if ($oldmode)
553 34 17 if defined $wantarray
554 0 17 if $message->verbosity < $message->_type_level($message->type)
564 34 17 unless $message->_should_be_issued(wantarray)
568 17 0 if exists $types->{$type}
569 0 17 unless $issue_using
580 2 49 if $message->_type_timestamp($message->type)
582 4 47 if $message->_type_tlc($message->type)
584 7 44 if $message->_type_id($message->type)
586 6 45 if (@args) { }
603 1 1 if $timestamp_format eq '1'
643 36 28 unless @_ > 1
646 1 27 if ($value =~ /(^.+):([$short_types])$/)
649 0 28 unless $value and $value =~ /^[\p{Alpha}_\-][\p{Digit}\p{Alpha}_\-]*$/
652 0 28 if exists $bad_identifiers{$value}
653 28 0 if ($message->_update_type_on_id_change)
654 1 27 if ($type) { }
658 1 26 if ($value =~ /[_\d]([$short_types])$/) { }
9 17 elsif ($value =~ /^([$short_types])[_\d]/) { }
668 1 16 if ($value =~ /($long_types)$/) { }
15 1 elsif ($value =~ /^($long_types)/) { }
706 5 17 if ref $export_tags and @$export_tags
708 7 15 if $export_ok
710 8 14 if $export
747 1 7 unless $package->_ensure_namespace_is_exporter($ns)
762 5 2 unless $package->_ensure_namespace_is_exporter($ns)
777 4 1 unless $package->_ensure_namespace_is_exporter($ns)
779 0 1 unless ref $export_tags and @$export_tags
784 1 0 unless defined do { "${ns}::EXPORT_TAGS" }->{$tag}
799 10 10 if $ns eq 'main'
801 1 9 unless $ns->isa('Exporter')
812 1 28 unless @_ > 1
835 28 1 if (@pairs % 2) { }
841 4 25 unless $class->isa(ref $message)
846 0 1 unless $method and not ref $method
847 0 1 unless ref $coderef and ref $coderef eq 'CODE'
860 0 0 exists $message->{'readmode'} ? :
0 1 unless @_ > 1
873 1 1 exists $message->{'response'} ? :
2 1 unless @_ > 1
885 0 0 exists $message->{'output'} ? :
0 51 unless @_ > 1
907 3 28 unless @_ > 1
908 0 28 unless $value
920 224 29 unless @_ > 1
922 1 28 if (length $type > 1)
926 29 0 if ($message->_update_level_on_type_change)
928 0 29 unless defined $level
933 0 29 if exists $message->{'types'}
943 5 35 unless @_ > 1
944 2 33 if ($value =~ /\D/)
946 1 1 if (length $type > 1)
951 0 2 unless defined $value
968 5 1 if /\S/
972 1 3 if (@lines and $id =~ /^[.]+$/) { }
1 2 elsif (@lines and $id =~ /^[+]+$/) { }
1019 1 27 if ($message->type eq 'R' and $message->template =~ /password/is)
1029 16 2 if (@args)
1035 7 41 if ($ref_type) { }
1036 4 3 if ($ref_type eq 'HASH') { }
2 1 elsif ($ref_type eq 'ARRAY') { }
1045 4 2 if @messages
1059 10 31 if ($this_arg eq 'EXPORT') { }
3 28 elsif ($this_arg eq 'EXPORT_OK') { }
9 19 elsif (substr($this_arg, 0, 1) eq ':') { }
1060 2 8 if (@messages)
1076 1 2 if (@messages)
1095 3 6 if @messages
1108 18 1 if (@args) { }
1117 12 3 if (@messages)