Branch Coverage

blib/lib/App/jl.pm
Criterion Covered Total %
branch 85 94 90.4


line true false branch
74 1 3 !!$self->opt('stderr') ? :
77 3 1 if (my $line = $self->_run_line)
87 1 31 if ($self->{'__current_orig_line'} =~ /^[\s\t\r\n]+$/)
91 2 29 unless ($self->{'__current_orig_line'} =~ /^\s*[\[\{]/)
92 1 1 $self->opt('sweep') ? :
95 4 25 if (my $rs = $self->opt("grep"))
96 1 3 unless ($self->_match_grep($rs))
101 3 25 if (my $rs = $self->opt("ignore"))
102 3 0 if ($self->_match_grep($rs))
114 6 1 if $self->{'__current_orig_line'} =~ /$r/
121 10 22 if ($self->opt("xxxx") or $self->opt("timestamp_key"))
126 1 31 if ($self->opt("yaml"))
139 1 24 if ($@) { }
151 1 23 if ($self->opt('yaml')) { }
175 14 10 if $self->opt("x")
181 14 10 if ($self->opt("x"))
185 14 10 if ($self->opt("xx"))
189 12 12 if ($self->opt("xxx"))
193 10 14 if ($self->opt("xxxx") or $self->opt("timestamp_key"))
194 7 3 if ($self->opt('xxxxx')) { }
225 14 121 if (_skippable_value($context, $LAST_VALUE))
232 8 113 if ($line =~ /[\t\r\n]/)
235 8 0 if scalar @elements > 1
243 7 81 if (_skippable_value($context, $LAST_VALUE))
250 79 2 if not $line =~ /, / or $line =~ /\\/
256 2 0 if scalar @elements > 1
263 6 80 if (_skippable_value($context, $LAST_VALUE))
270 0 80 if $line =~ /\\/
285 3 77 if scalar @elements > 1
292 11 26 if not $context or $context ne "HASH"
294 9 17 if ($UNIXTIMESTAMP_KEY and $LAST_VALUE eq $UNIXTIMESTAMP_KEY and $line =~ /(\d+(\.\d+)?)/ or $LAST_VALUE =~ /(?:$MAYBE_UNIXTIME)/i and $line =~ /(\d+(\.\d+)?)/)
298 9 0 if (my $date = _ts2date($1, $2))
309 7 39 if ($line =~ /(\d+(\.\d+)?)/)
310 3 4 if (my $date = _ts2date($1, $2))
321 12 4 if ($unix_timestamp >= 946684800 and $unix_timestamp <= '4294967295000')
322 3 9 if ($unix_timestamp > 4294967295)
327 1 11 $GMTIME ? :
337 3 216 if ($line =~ /^[\s\t\r\n]+/)
342 9 210 if ($line =~ /[\s\t\r\n]+$/)
347 11 208 if ($trim)
356 174 0 if ($self->{'_recursive_call'} > 0)
358 0 174 if $orig =~ /^\[\d+\]$/
359 149 25 if (not _is_number($_[0]))
363 39 110 if (not $@)
376 0 174 unless defined $value
380 25 149 $flags & 12288 && !($flags & 16384) ? :
411 0 35 unless &GetOptionsFromArray(\@argv, "no-pretty", \$opt->{'no_pretty'}, "x", \$opt->{'x'}, "xx", \$opt->{'xx'}, "xxx", \$opt->{'xxx'}, "xxxx", \$opt->{'xxxx'}, "X|xxxxx", \$opt->{'xxxxx'}, "timestamp-key=s", \$opt->{'timestamp_key'}, "gmtime", \$opt->{'gmtime'}, "g|grep=s\@", \$opt->{'grep'}, "ignore=s\@", \$opt->{'ignore'}, "yaml|yml", \$opt->{'yaml'}, "unbuffered", \$opt->{'unbuffered'}, "stderr", \$opt->{'stderr'}, "sweep", \$opt->{'sweep'}, "h|help", sub { $class->_show_usage(1); } , "v|version", sub { print "$0 $VERSION\n"; exit 1; } )