Branch Coverage

blib/lib/Data/Printer/Object.pm
Criterion Covered Total %
branch 110 172 63.9


line true false branch
76 193 10052 if @_ > 1
96 598 932 if (defined $new_value) { }
100 234 698 unless defined $self->{'_current_name'}
107 62 182 @_ == 1 ? :
222 1 243 if (exists $props->{'as'})
236 7 237 defined $props->{'output'} ? :
244 19 736 unless exists $core_options{$key}
253 244 4 if (@_ > 1)
264 239 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') { }
275 2 0 if (open my $fh, '>>', $output) { }
286 0 244 if ($error)
301 244 68 if (defined $value)
303 207 37 if ($value) { }
307 0 207 if exists $self->{'_original_index'}
309 0 207 if exists $self->{'_original_separator'}
311 0 207 if exists $self->{'_original_array_overflow'}
313 0 207 if exists $self->{'_original_hash_overflow'}
315 0 207 if exists $self->{'_original_string_overflow'}
337 244 0 if (defined $value)
339 0 244 if ($value) { }
349 0 244 if exists $self->{'_original_string_max'}
351 0 244 if exists $self->{'_original_array_max'}
353 0 244 if exists $self->{'_original_hash_max'}
368 39 205 if (exists $props->{'filters'})
369 0 39 if (ref $props->{'filters'} eq 'HASH') { }
39 0 elsif (ref $props->{'filters'} eq 'ARRAY') { }
385 26 15 if (not defined $filter_reftype) { }
15 0 elsif ($filter_reftype eq 'HASH') { }
390 0 47 if ($k eq '-external')
399 47 0 if (&Scalar::Util::reftype($filter->{$k}) eq 'CODE') { }
422 0 2466 if ($error)
441 239 5 if (not $colored or $colored eq 'auto' and exists $ENV{'ANSI_COLORS_DISABLED'} || $self->output eq 'handle' || $self->output eq 'file') { }
455 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'}) { }
460 0 0 $major_version >= 3 ? :
478 0 0 $colored eq 'auto' ? :
498 0 244 unless ($theme_object)
499 0 0 if ($theme_name ne $default_theme)
507 0 0 unless $theme_object
514 675 0 exists $self->{'type_filters'}{$type} ? :
519 133 744 exists $self->{'class_filters'}{$type} ? :
528 0 636 unless $ref_kind
531 5 631 if $ref_kind eq 'REGEXP'
540 5 631 if (defined $class and $class eq 'Regexp')
541 5 0 if ($ref_kind eq 'Regexp' or $] < 5.011 and $ref_kind eq 'SCALAR')
546 94 542 if (defined $class)
547 93 1 if ($self->class->parent_filters) { }
585 2 706 unless ref $data
587 633 73 unless (exists $self->{'_seen'}{$id})
588 74 559 $self->show_refcount ? :
594 40 33 if $options{'seen_override'}
606 0 20 unless ref $data and keys %{$$self{'_seen'};}
619 25 49 if (ref $data eq 'REF' and ref $$data)
625 0 74 unless $rv->can('REFCNT')
651 33 675 if (my $name = $seen->{'name'})
652 0 33 ref $data eq 'SCALAR' && $self->resolve_scalar_refs ? :
671 39 636 exists $options{'force_type'} ? :
676 675 1 if (defined(my $result = &$filter($data, $self)))
683 607 68 if ref $data ne 'REF'
686 20 54 if ($self->show_refcount and ref $data ne 'SCALAR' and $seen->{'refcount'} > 1)
690 302 373 if (--$self->{'_position'} == 0)
703 675 0 unless $self->show_memsize and $self->show_memsize eq 'all' || $self->show_memsize >= $self->{'_position'}
710 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) { }
722 0 0 if ($error)
723 0 0 if ($error =~ m[locate Devel/Size.pm]) { }
725 0 0 if $self->{'_position'} == 1
732 0 0 unless $size
733 0 0 $size < 0 ? :
739 38 670 unless $self->show_weak
743 435 235 if ($realtype and $realtype eq 'REF' || $realtype eq 'SCALAR') { }
749 653 17 unless $isweak
755 59 0 unless $self->caller_info
764 0 0 $self->caller_message_newline ? :
766 0 0 $self->caller_message_position eq 'before' ? :
776 3 1825 if ($self->{'_output_color_level'} and defined $color_type)
779 1 2 if (not defined $sgr_color and defined $default_color)
782 1 2 if ($sgr_color)
783 0 1 defined $end_color ? :
796 7 668 if $self->show_readonly and &Internals::SvREADONLY($_[1])