Condition Coverage

lib/DateTime/Format/JP.pm
Criterion Covered Total %
condition 80 208 38.4


and 2 conditions

line l !l condition
853 0 15 scalar @{$def->{'start'};} and scalar @{$def->{'end'};}
929 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
932 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1283 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1286 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
417 85 0 0 exists $p->{'hankaku'} and not exists $p->{'zenkaku'}
441 0 83 0 ref $dt and not $dt->isa('DateTime')
798 0 0 116 defined $num and length $num
806 0 116 0 length $num and $num =~ s/^([\x{3007}\x{4e00}\x{4e8c}\x{4e09}\x{56db}\x{4e94}\x{516d}\x{4e03}\x{516b}\x{4e5d}])\x{767e}//
811 0 101 15 length $num and $num =~ s/^([\x{3007}\x{4e00}\x{4e8c}\x{4e09}\x{56db}\x{4e94}\x{516d}\x{4e03}\x{516b}\x{4e5d}])\x{5341}//
846 0 15 0 ref $dt and not $dt->isa('DateTime')
852 15 0 3615 scalar @{$def->{'end'};} and $y > $def->{'end'}[0]
853 15 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0]
15 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $y <= $def->{'end'}[0]
0 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $y <= $def->{'end'}[0] and $m >= $def->{'start'}[1]
0 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $y <= $def->{'end'}[0] and $m >= $def->{'start'}[1] and $m <= $def->{'end'}[1]
0 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $y <= $def->{'end'}[0] and $m >= $def->{'start'}[1] and $m <= $def->{'end'}[1] and $d >= $def->{'start'}[2]
0 0 0 scalar @{$def->{'start'};} and scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $y <= $def->{'end'}[0] and $m >= $def->{'start'}[1] and $m <= $def->{'end'}[1] and $d >= $def->{'start'}[2] and $d < $def->{'end'}[2]
0 0 15 scalar @{$def->{'start'};} and not scalar @{$def->{'end'};}
0 0 15 scalar @{$def->{'start'};} and not scalar @{$def->{'end'};} and $y >= $def->{'start'}[0]
0 0 15 scalar @{$def->{'start'};} and not scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $m >= $def->{'start'}[1]
0 0 15 scalar @{$def->{'start'};} and not scalar @{$def->{'end'};} and $y >= $def->{'start'}[0] and $m >= $def->{'start'}[1] and $d >= $def->{'start'}[2]
889 60 3 15 length $opts->{'ampm'} and $opts->{'ampm'} eq "\x{5348}\x{5f8c}"
894 78 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
897 34 0 44 $opts->{'era'} and ref $opts->{'era'}
929 0 0 78 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED
0 0 78 defined $Nice::Try::WANT and length $Nice::Try::WANT
932 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 78 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 78 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__NEXT__'
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__LAST__'
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__REDO__'
1047 0 0 40 defined $num and length $num
1091 0 0 3 defined $num and length $num
1161 0 0 208 defined $num and length $num
1268 44 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
1270 0 0 44 ref $ref eq 'ARRAY' and scalar @$ref == 3
1283 0 0 44 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED
0 0 44 defined $Nice::Try::WANT and length $Nice::Try::WANT
1286 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 44 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 44 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__NEXT__'
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__LAST__'
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__REDO__'

or 2 conditions

line l !l condition
524 5 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
565 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
588 1 0 $self->lookup_era_by_date($dt) || (return)
667 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
737 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
828 44 0 shift @_ || (return $self->error('No era name was provided to lookup.'))
958 29 0 $self->lookup_era($re->{'era'}) || (return $self->error(qq[No era "$re->{'era'}" could be found.]))
992 0 0 $self->lookup_era($re->{'era'}) || (return $self->error(qq[No era "$re->{'era'}" could be found.]))
1011 15 0 $self->lookup_era($re->{'era'}) || (return $self->error(qq[No era "$re->{'era'}" could be found.]))

or 3 conditions

line l !l&&r !l&&!r condition
421 0 85 0 ref $this || $this
441 0 0 83 not ref $dt or ref $dt and not $dt->isa('DateTime')
498 0 0 0 $self->{'traditional'} || $self->{'zenkaku'} || $self->{'kanji_number'}
545 2 1 2 $self->{'traditional'} or $self->{'kanji_number'}
628 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
636 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
648 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
701 1 1 2 $self->{'traditional'} or $self->{'kanji_number'}
725 1 1 2 $self->{'traditional'} or $self->{'kanji_number'}
755 1 0 2 $self->{'zenkaku'} or $self->{'traditional'}
0 1 1 $self->{'zenkaku'} or $self->{'traditional'} or $self->{'kanji_number'}
846 0 0 15 not ref $dt or ref $dt and not $dt->isa('DateTime')
932 0 78 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
976 72 55 32 not length $re->{$_} or $re->{$_} =~ /^[0-9]+$/
1059 0 1 39 not length $num or $num =~ /^0+$/
1068 0 1 38 not length $num or $num =~ /^0+$/
1078 7 0 31 not length $num or $num =~ /^0+$/
1228 0 59 0 ref $_[0] || $_[0]
1286 0 44 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')