Condition Coverage

blib/lib/HTTP/Date.pm
Criterion Covered Total %
condition 25 26 96.1


and 3 conditions

line !l l&&!r l&&r condition
71 8 12 9 $1 and $1 eq "-"
209 109 23 0 do { length $yr < 3 } && do { my $cur_yr = (localtime)[5] + 1900; my $m = $cur_yr % 100; my $tmp = $yr; $yr += $cur_yr - $m; $m -= $tmp; $yr += $m > 0 ? 100 : -100 if abs $m > 50 }
236 4 3 10 $hr == 12 and $ampm eq "AM"
237 12 3 2 $ampm eq "PM" and $hr != 12

or 2 conditions

line l !l condition
202 58 4 $MoY{$mon} || $MoY{ucfirst lc $mon} || $mon =~ /^[0-9][0-9]?$/ && $mon >= 1 && $mon <= 12 && int $mon || (return)

or 3 conditions

line l !l&&r !l&&!r condition
99 69 6 74 ($day, $mon, $yr, $hr, $min, $sec, $tz) = m[^ ([0-9][0-9]?) # day (?:\s+|[-/]) (\w+) # month (?:\s+|[-/]) ([0-9]+) # year (?: (?:\s+|:) # separator before clock ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds )? # optional clock \s* ([-+]?[0-9]{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* (?:\(\w+\)|\w{3,})? # ASCII representation of timezone. \s*$ ]x or ($mon, $day, $hr, $min, $sec, $tz, $yr) = /^ (\w{1,3}) # month \s+ ([0-9][0-9]?) # day \s+ ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds \s+ (?:([A-Za-z]+)\s+)? # optional timezone ([0-9]+) # year \s*$ # allow trailing whitespace /x
75 5 69 ($day, $mon, $yr, $hr, $min, $sec, $tz) = m[^ ([0-9][0-9]?) # day (?:\s+|[-/]) (\w+) # month (?:\s+|[-/]) ([0-9]+) # year (?: (?:\s+|:) # separator before clock ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds )? # optional clock \s* ([-+]?[0-9]{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* (?:\(\w+\)|\w{3,})? # ASCII representation of timezone. \s*$ ]x or ($mon, $day, $hr, $min, $sec, $tz, $yr) = /^ (\w{1,3}) # month \s+ ([0-9][0-9]?) # day \s+ ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds \s+ (?:([A-Za-z]+)\s+)? # optional timezone ([0-9]+) # year \s*$ # allow trailing whitespace /x or ($mon, $day, $yr, $hr, $min, $sec) = /^ (\w{3}) # month \s+ ([0-9][0-9]?) # day \s+ (?: ([0-9][0-9][0-9][0-9]) | # year ([0-9]{1,2}):([0-9]{2}) # hour:min (?::([0-9][0-9]))? # optional seconds ) \s*$ /x
11 40 29 ($day, $mon, $yr, $hr, $min, $sec, $tz) = m[^ ([0-9][0-9]?) # day (?:\s+|[-/]) (\w+) # month (?:\s+|[-/]) ([0-9]+) # year (?: (?:\s+|:) # separator before clock ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds )? # optional clock \s* ([-+]?[0-9]{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* (?:\(\w+\)|\w{3,})? # ASCII representation of timezone. \s*$ ]x or ($mon, $day, $hr, $min, $sec, $tz, $yr) = /^ (\w{1,3}) # month \s+ ([0-9][0-9]?) # day \s+ ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds \s+ (?:([A-Za-z]+)\s+)? # optional timezone ([0-9]+) # year \s*$ # allow trailing whitespace /x or ($mon, $day, $yr, $hr, $min, $sec) = /^ (\w{3}) # month \s+ ([0-9][0-9]?) # day \s+ (?: ([0-9][0-9][0-9][0-9]) | # year ([0-9]{1,2}):([0-9]{2}) # hour:min (?::([0-9][0-9]))? # optional seconds ) \s*$ /x or ($yr, $mon, $day, $hr, $min, $sec, $tz) = m[^ ([0-9]{4}) # year [-/]? ([0-9][0-9]?) # numerical month [-/]? ([0-9][0-9]?) # day (?: (?:\s+|[-:Tt]) # separator before clock ([0-9][0-9]?):?([0-9][0-9]) # hour:min (?::?([0-9][0-9](?:\.[0-9]*)?))? # optional seconds (and fractional) )? # optional clock \s* ([-+]?[0-9][0-9]?:?(?:[0-9][0-9])? |Z|z)? # timezone (Z is "zero meridian", i.e. GMT) \s*$ ]x
45 17 12 ($day, $mon, $yr, $hr, $min, $sec, $tz) = m[^ ([0-9][0-9]?) # day (?:\s+|[-/]) (\w+) # month (?:\s+|[-/]) ([0-9]+) # year (?: (?:\s+|:) # separator before clock ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds )? # optional clock \s* ([-+]?[0-9]{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* (?:\(\w+\)|\w{3,})? # ASCII representation of timezone. \s*$ ]x or ($mon, $day, $hr, $min, $sec, $tz, $yr) = /^ (\w{1,3}) # month \s+ ([0-9][0-9]?) # day \s+ ([0-9][0-9]?):([0-9][0-9]) # hour:min (?::([0-9][0-9]))? # optional seconds \s+ (?:([A-Za-z]+)\s+)? # optional timezone ([0-9]+) # year \s*$ # allow trailing whitespace /x or ($mon, $day, $yr, $hr, $min, $sec) = /^ (\w{3}) # month \s+ ([0-9][0-9]?) # day \s+ (?: ([0-9][0-9][0-9][0-9]) | # year ([0-9]{1,2}):([0-9]{2}) # hour:min (?::([0-9][0-9]))? # optional seconds ) \s*$ /x or ($yr, $mon, $day, $hr, $min, $sec, $tz) = m[^ ([0-9]{4}) # year [-/]? ([0-9][0-9]?) # numerical month [-/]? ([0-9][0-9]?) # day (?: (?:\s+|[-:Tt]) # separator before clock ([0-9][0-9]?):?([0-9][0-9]) # hour:min (?::?([0-9][0-9](?:\.[0-9]*)?))? # optional seconds (and fractional) )? # optional clock \s* ([-+]?[0-9][0-9]?:?(?:[0-9][0-9])? |Z|z)? # timezone (Z is "zero meridian", i.e. GMT) \s*$ ]x or ($mon, $day, $yr, $hr, $min, $ampm) = /^ ([0-9]{2}) # numerical month - ([0-9]{2}) # day - ([0-9]{2,4}) # year \s+ ([0-9][0-9]?):([0-9][0-9])([APap][Mm]) # hour:min AM or PM \s*$ /x