Condition Coverage

lib/DateTime/Format/JP.pm
Criterion Covered Total %
condition 84 220 38.1


and 2 conditions

line l !l condition
859 0 15 scalar @{$def->{'start'};} and scalar @{$def->{'end'};}
935 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
938 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1280 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

and 3 conditions

line !l l&&!r l&&r condition
424 85 0 0 exists $p->{'hankaku'} and not exists $p->{'zenkaku'}
448 0 83 0 ref $dt and not $dt->isa("DateTime")
805 0 0 116 defined $num and length $num
813 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}//
818 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}//
852 0 15 0 ref $dt and not $dt->isa("DateTime")
858 15 0 3615 scalar @{$def->{'end'};} and $y > $def->{'end'}[0]
859 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]
895 60 3 15 length $opts->{'ampm'} and $opts->{'ampm'} eq "\x{5348}\x{5f8c}"
900 78 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
903 34 0 44 $opts->{'era'} and ref $opts->{'era'}
935 0 0 78 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED
78 0 0 !length([caller]->[1]) && [caller 1]->[3] eq '(eval)'
0 0 78 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED and not !length([caller]->[1]) && [caller 1]->[3] eq '(eval)'
0 0 78 defined $Nice::Try::WANT and length $Nice::Try::WANT
938 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
1086 0 0 3 defined $num and length $num
1155 0 0 208 defined $num and length $num
1265 44 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
1267 0 0 44 ref $ref eq "ARRAY" and scalar @$ref == 3
1280 0 0 44 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED
44 0 0 !length([caller]->[1]) && [caller 1]->[3] eq '(eval)'
0 0 44 defined $Nice::Try::WANTARRAY and not $Nice::Try::THREADED and not !length([caller]->[1]) && [caller 1]->[3] eq '(eval)'
0 0 44 defined $Nice::Try::WANT and length $Nice::Try::WANT
1283 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
531 5 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
572 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
595 1 0 $self->lookup_era_by_date($dt) || (return)
674 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
744 3 0 $self->lookup_era_by_date($dt) || (return $self->error("Unable to find an era for date '${dt}'"))
834 44 0 shift @_ || (return $self->error('No era name was provided to lookup.'))
962 29 0 $self->lookup_era($re->{'era'}) || (return $self->error(qq[No era "$re->{'era'}" could be found.]))
995 0 0 $self->lookup_era($re->{'era'}) || (return $self->error(qq[No era "$re->{'era'}" could be found.]))
1012 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
428 0 85 0 ref $this || $this
448 0 0 83 not ref $dt or ref $dt and not $dt->isa("DateTime")
505 0 0 0 $self->{'traditional'} || $self->{'zenkaku'} || $self->{'kanji_number'}
552 2 1 2 $self->{'traditional'} or $self->{'kanji_number'}
635 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
643 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
655 2 1 2 $self->{'traditional'} || $self->{'kanji_number'}
708 1 1 2 $self->{'traditional'} or $self->{'kanji_number'}
732 1 1 2 $self->{'traditional'} or $self->{'kanji_number'}
762 1 0 2 $self->{'zenkaku'} or $self->{'traditional'}
0 1 1 $self->{'zenkaku'} or $self->{'traditional'} or $self->{'kanji_number'}
852 0 0 15 not ref $dt or ref $dt and not $dt->isa("DateTime")
938 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')
980 72 55 32 not length $re->{$_} or $re->{$_} =~ /^[0-9]+$/
1057 0 1 39 not length $num or $num =~ /^0+$/
1065 0 1 38 not length $num or $num =~ /^0+$/
1073 7 0 31 not length $num or $num =~ /^0+$/
1225 0 59 0 ref $_[0] || $_[0]
1283 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')