Branch Coverage

blib/lib/Data/Printer/Object.pm
Criterion Covered Total %
branch 114 172 66.2


line true false branch
78 193 10073 if @_ > 1
98 598 934 if (defined $new_value) { }
102 236 698 unless defined $self->{'_current_name'}
109 64 182 @_ == 1 ? :
226 1 245 if (exists $props->{'as'})
240 7 239 defined $props->{'output'} ? :
248 19 746 unless exists $core_options{$key}
257 246 4 if (@_ > 1)
268 241 5 if (not $ref and exists $targets{lc $output}) { }
3 2 elsif ($ref and $ref eq 'GLOB' or not $ref and (\$output) =~ /GLOB\([^()]+\)$/) { }
2 0 elsif (not $ref or $ref eq 'SCALAR') { }
279 2 0 if (open my $fh, '>>', $output) { }
290 0 246 if ($error)
305 246 68 if (defined $value)
307 209 37 if ($value) { }
311 0 209 if exists $self->{'_original_index'}
313 0 209 if exists $self->{'_original_separator'}
315 0 209 if exists $self->{'_original_array_overflow'}
317 0 209 if exists $self->{'_original_hash_overflow'}
319 0 209 if exists $self->{'_original_string_overflow'}
341 246 0 if (defined $value)
343 0 246 if ($value) { }
353 0 246 if exists $self->{'_original_string_max'}
355 0 246 if exists $self->{'_original_array_max'}
357 0 246 if exists $self->{'_original_hash_max'}
372 39 207 if (exists $props->{'filters'})
373 0 39 if (ref $props->{'filters'} eq 'HASH') { }
39 0 elsif (ref $props->{'filters'} eq 'ARRAY') { }
389 26 15 if (not defined $filter_reftype) { }
15 0 elsif ($filter_reftype eq 'HASH') { }
394 0 47 if ($k eq "-external")
403 47 0 if (&Scalar::Util::reftype($filter->{$k}) eq 'CODE') { }
426 0 2486 if ($error)
445 241 5 if (not $colored or $colored eq 'auto' and exists $ENV{'ANSI_COLORS_DISABLED'} || $self->output eq 'handle' || $self->output eq 'file') { }
459 0 5 if ($ENV{'COLORTERM'} and $ENV{'COLORTERM'} eq 'truecolor') { }
0 5 elsif ($ENV{'TERM_PROGRAM'} and $ENV{'TERM_PROGRAM'} eq 'iTerm.app') { }
0 5 elsif ($ENV{'TERM_PROGRAM'} and $ENV{'TERM_PROGRAM'} eq 'Apple_Terminal') { }
0 5 elsif ($ENV{'TERM'} and $ENV{'TERM'} =~ /\-256(?:color)?\z/i) { }
5 0 elsif ($ENV{'TERM'} and $ENV{'TERM'} =~ /\A(?:screen|xterm|vt100|rxvt)/i || $ENV{'TERM'} =~ /color|ansi|cygwin|linux/i) { }
0 0 elsif ($ENV{'COLORTERM'}) { }
464 0 0 $major_version >= 3 ? :
482 0 0 $colored eq 'auto' ? :
502 0 246 unless ($theme_object)
503 0 0 if ($theme_name ne $default_theme)
511 0 0 unless $theme_object
518 677 0 exists $self->{'type_filters'}{$type} ? :
523 133 746 exists $self->{'class_filters'}{$type} ? :
532 0 638 unless $ref_kind
535 5 633 if $ref_kind eq "REGEXP"
544 5 633 if (defined $class and $class eq "Regexp")
545 5 0 if ($ref_kind eq "Regexp" or $] < "5.011" and $ref_kind eq "SCALAR")
550 94 544 if (defined $class)
551 93 1 if ($self->class->parent_filters) { }
589 2 708 unless ref $data
591 635 73 unless (exists $self->{'_seen'}{$id})
592 74 561 $self->show_refcount ? :
598 40 33 if $options{'seen_override'}
610 0 20 unless ref $data and keys %{$$self{"_seen"};}
623 25 49 if (ref $data eq "REF" and ref $$data)
629 0 74 unless $rv->can("REFCNT")
655 33 677 if (my $name = $seen->{'name'})
656 0 33 ref $data eq 'SCALAR' && $self->resolve_scalar_refs ? :
675 39 638 exists $options{'force_type'} ? :
680 677 1 if (defined(my $result = &$filter($data, $self)))
690 609 68 if ref $data ne "REF"
693 20 54 if ($self->show_refcount and ref $data ne "SCALAR" and $seen->{'refcount'} > 1)
697 304 373 if (--$self->{'_position'} == 0)
710 677 0 unless $self->show_memsize and $self->show_memsize eq 'all' || $self->show_memsize >= $self->{'_position'}
717 0 0 if ($unit eq 'M' or $unit eq 'AUTO' and $size > 1048576) { }
0 0 elsif ($unit eq 'K' or $unit eq 'AUTO' and $size > 1024) { }
729 0 0 if ($error)
730 0 0 if ($error =~ m[locate Devel/Size.pm]) { }
732 0 0 if $self->{'_position'} == 1
739 0 0 unless $size
740 0 0 $size < 0 ? :
746 38 672 unless $self->show_weak
750 437 235 if ($realtype and $realtype eq 'REF' || $realtype eq 'SCALAR') { }
756 655 17 unless $isweak
762 59 2 unless $self->caller_info
771 0 2 $self->caller_message_newline ? :
773 1 1 $self->caller_message_position eq 'before' ? :
783 3 1829 if ($self->{'_output_color_level'} and defined $color_type)
786 1 2 if (not defined $sgr_color and defined $default_color)
789 1 2 if ($sgr_color)
790 0 1 defined $end_color ? :
803 7 670 if $self->show_readonly and &Internals::SvREADONLY($_[1])