Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Number-Denominal CPAN distribution.

Report information
The Basics
Id: 92145
Status: resolved
Priority: 0/
Queue: Number-Denominal

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.004
Fixed in: (no value)



Subject: Race condition in SYNOPSIS code
my $seconds = (localtime)[2]*3600 + (localtime)[1]*60 + (localtime)[2]; Bad idea. Multiple calls to time(), meaning the hour or minute may change in between leading to inconsistent results. Much better is: my $now = time; my $seconds = (localtime $now)[2]*3600 + (localtime $now)[1]*60 + (localtime $now)[2]; Or maybe my ( $sec, $min, $hr ) = (localtime)[0..2]; my $seconds = $hr*3600 + $min*60 + $sec; Or other variations on a theme. -- Paul Evans
Fixed in v1.101, which just got shipped. Thanks for the correction.