Branch Coverage

blib/lib/Time/UTC/Segment.pm
Criterion Covered Total %
branch 20 70 28.5


line true false branch
105 0 195 if $end_utc_day <= $start_utc_day
107 0 195 if $end_utc_day <= $seg->start_utc_day
108 0 195 if $start_utc_day > $seg->start_utc_day
113 0 195 unless $start_tai_instant == $seg->start_tai_instant and $utc_second_length == $seg->utc_second_length
121 0 195 if abs $leap_utc_seconds >= 60
150 0 195 unless $line =~ /\A[\ \t]*[0-9]+[\ \t]*[A-Z]+[\ \t]*[0-9]+[\ \t]* =[\ \t]* JD[\ \t]*([0-9]+\.?[0-9]*)[\ \t]* TAI[\ \t]*-[\ \t]*UTC[\ \t]*=[\ \t]* (-?[0-9]+\.?[0-9]*)[\ \t]*S[\ \t]* ([\+\-])[\ \t]* \([\ \t]*MJD[\ \t]*([\+\-])[\ \t]* (-?[0-9]+\.?[0-9]*)[\ \t]*\)[\ \t]* X[\ \t]*(-?[0-9]+\.?[0-9]*)[\ \t]*S[\ \t]* \n\z/xi
164 0 195 unless $start_mjd->is_int
168 0 195 if $base_mjd_sign eq '+'
169 0 195 if $tweak_sign eq '-'
178 190 5 if (defined $seg)
188 0 5 unless defined $seg
195 5 0 if ($end_utc_day > $$seg{'start_utc_day'})
212 0 5 unless $init_dat =~ s/^[\ \t]*[0-9]+[\ \t]*[A-Z]+[\ \t]*[0-9]+[\ \t]* =[\ \t]* JD[\ \t]*([0-9]+\.?[0-9]*)[\ \t]* unknown[\ \t]*\n\z//mix
239 0 0 unless ($$httpresp{'status'} == 200)
259 0 0 unless my $ftp = 'Net::FTP'->new('utcnist2.colorado.edu')
261 0 0 unless $ftp->login('anonymous', '-anonymous@')
264 0 0 unless $ftp->binary
267 0 0 unless $ftp->cwd('pub')
270 0 0 unless my $ftpd = $ftp->retr('leap-seconds.list')
276 0 0 unless defined $n
277 0 0 if $n == 0
280 0 0 unless $ftpd->close
282 0 0 unless $list =~ /\n\z/
283 0 0 unless $list =~ /^\#h([ \t0-9a-fA-F]+)$/m
291 0 0 unless sha1_hex($data_to_hash) eq $hash
296 0 0 unless $line =~ /\A[ \t]*([0-9]+)[ \t]+([0-9]+)[ \t]*(?:\#|\z)/
301 0 0 unless $next_start_utc_day->is_int
305 0 0 if (defined $start_utc_day)
316 0 0 unless $list =~ /^\#\@[ \t]*([0-9]+)[ \t]*$/m
320 0 0 if (defined $start_utc_day)
333 0 0 unless eval { do { local $SIG{'__DIE__'}; _download_leap_seconds_list; 1 } }
341 15 3 unless $time >= $wait_until or $time < $last_download
344 0 3 if _download_latest_data
370 22 0 if (defined $try_to_extend_knowledge)
377 4 18 if (ref $self eq 'Time::UTC::Segment::Complete')