Branch Coverage

blib/lib/Text/Filter.pm
Criterion Covered Total %
branch 67 104 64.4


line true false branch
436 36 0 if exists $_attributes{$attr}
447 0 15 if ref $class
457 6 93 $attr =~ /^_/ ? :
460 39 60 if (exists $atts{$attr}) { }
469 0 15 if (%atts)
490 12 3 if (ref $handler) { }
1 2 elsif ($handler =~ /^\*/) { }
491 0 12 if ($handler =~ /=/ and $handler->isa('IO::File')) { }
2 10 elsif (ref $handler eq 'CODE') { }
8 2 elsif (ref $handler eq 'SCALAR') { }
2 0 elsif (ref $handler eq 'ARRAY') { }
500 6 54 unless defined $$handler
501 46 8 if ((my $i = index($$handler, "\n")) >= 0) { }
521 0 2 unless $fd = 'IO::File'->new($handler)
527 0 15 unless defined $input
532 0 15 if defined $postread
544 15 0 if (ref $handler) { }
0 0 elsif ($handler =~ /^\*/) { }
545 0 15 if ($handler =~ /=/ and $handler->isa('IO::File')) { }
3 12 elsif (ref $handler eq 'ARRAY') { }
8 4 elsif (ref $handler eq 'SCALAR') { }
4 0 elsif (ref $handler eq 'CODE') { }
551 3 0 unless @$handler
555 1 7 unless defined $$handler
566 0 0 unless $handler =~ /^>/
568 0 0 unless $fd = 'IO::File'->new($handler)
574 0 15 unless defined $output
579 0 15 if defined $prewrite
589 0 15 if (ref $postread and ref $postread eq 'CODE') { }
11 4 elsif ($postread eq 'none' or $postread eq '0') { }
4 0 elsif ($postread eq 'chomp' or $postread eq '1') { }
611 0 15 if (ref $prewrite and ref $prewrite eq 'CODE') { }
11 4 elsif ($prewrite eq 'none' or $prewrite eq '0') { }
4 0 elsif ($prewrite eq 'newline' or $prewrite eq '1') { }
631 14 2 unless defined $filter
632 0 2 unless ref $filter eq 'CODE'
677 0 94 if @{$self->get_filter_pushback;} > 0
681 13 81 unless defined($line = &$input())
683 33 48 if (defined(my $postread = $self->get_filter_postread))
684 0 33 if ($postread ne '') { }
685 0 0 unless defined($line = &$postread($line))
692 10 71 if (defined(my $filter = $self->get_filter_filter))
693 4 6 unless defined($line = &$filter($line))
710 0 0 if @{$self->get_filter_pushback;} > 0
724 12 35 if (defined $prewrite)
725 0 12 if ($prewrite ne '') { }
12 0 elsif (defined $/) { }
727 0 0 unless defined $line
732 0 12 $/ eq '' ? :
747 4 2 if (ref $self) { }
748 0 4 if @_ > 1
749 1 3 if @_