r58847 - in /branches/upstream/libtime-clock-perl/current: Changes META.yml lib/Time/Clock.pm t/math.t t/parse.t

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Fri Jun 4 11:45:21 UTC 2010


Author: ansgar-guest
Date: Fri Jun  4 11:45:04 2010
New Revision: 58847

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58847
Log:
[svn-upgrade] Integrating new upstream version, libtime-clock-perl (1.01)

Modified:
    branches/upstream/libtime-clock-perl/current/Changes
    branches/upstream/libtime-clock-perl/current/META.yml
    branches/upstream/libtime-clock-perl/current/lib/Time/Clock.pm
    branches/upstream/libtime-clock-perl/current/t/math.t
    branches/upstream/libtime-clock-perl/current/t/parse.t

Modified: branches/upstream/libtime-clock-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtime-clock-perl/current/Changes?rev=58847&op=diff
==============================================================================
--- branches/upstream/libtime-clock-perl/current/Changes (original)
+++ branches/upstream/libtime-clock-perl/current/Changes Fri Jun  4 11:45:04 2010
@@ -1,3 +1,8 @@
+1.01 (06.03.2010) - John Siracusa <siracusa at gmail.com>
+
+    * Prevent parse failure on greater-than-nanoseconds precision.
+      (The extra precision is discarded.)
+
 1.00 (03.09.2010) - John Siracusa <siracusa at gmail.com>
 
     * The %i format now correctly shows 12 for 12 AM.

Modified: branches/upstream/libtime-clock-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtime-clock-perl/current/META.yml?rev=58847&op=diff
==============================================================================
--- branches/upstream/libtime-clock-perl/current/META.yml (original)
+++ branches/upstream/libtime-clock-perl/current/META.yml Fri Jun  4 11:45:04 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Time-Clock
-version:            1.00
+version:            1.01
 abstract:           Twenty-four hour clock object with nanosecond precision.
 author:
     - John Siracusa <siracusa at gmail.com>

Modified: branches/upstream/libtime-clock-perl/current/lib/Time/Clock.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtime-clock-perl/current/lib/Time/Clock.pm?rev=58847&op=diff
==============================================================================
--- branches/upstream/libtime-clock-perl/current/lib/Time/Clock.pm (original)
+++ branches/upstream/libtime-clock-perl/current/lib/Time/Clock.pm Fri Jun  4 11:45:04 2010
@@ -4,7 +4,7 @@
 
 use Carp;
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 use overload
 (
@@ -251,7 +251,7 @@
   if(my($hour, $min, $sec, $fsec, $ampm) = ($time =~ 
   m{^
       (\d\d?) # hour
-      (?::(\d\d)(?::(\d\d))?)?(?:\.(\d{0,9}))? # min? sec? nanosec?
+      (?::(\d\d)(?::(\d\d))?)?(?:\.(\d{0,9})\d*)? # min? sec? nanosec?
       (?:\s*([aApP]\.?[mM]\.?))? # am/pm
     $
   }x))
@@ -342,10 +342,10 @@
 
     if(my($hour, $min, $sec, $fsec) = ($delta =~ 
     m{^
-        (\d+)            # hours
-        (?::(\d+))?      # minutes
-        (?::(\d+))?      # seconds
-        (?:\.(\d{0,9}))? # nanoseconds
+        (\d+)               # hours
+        (?::(\d+))?         # minutes
+        (?::(\d+))?         # seconds
+        (?:\.(\d{0,9})\d*)? # nanoseconds
       $
     }x))
     {

Modified: branches/upstream/libtime-clock-perl/current/t/math.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtime-clock-perl/current/t/math.t?rev=58847&op=diff
==============================================================================
--- branches/upstream/libtime-clock-perl/current/t/math.t (original)
+++ branches/upstream/libtime-clock-perl/current/t/math.t Fri Jun  4 11:45:04 2010
@@ -119,7 +119,7 @@
 $t->add('1:2:3.456');
 is($t->as_string, '02:04:06.456', 'add 1:2:3.456 string');
 
-eval { $t->add('125:161:162.2345678901') };
+eval { $t->add('125:161:162.2345678901x') };
 ok($@, 'bad delta string 125:161:162.2345678901');
 
 eval { $t->add(':161:162.2345678901') };

Modified: branches/upstream/libtime-clock-perl/current/t/parse.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtime-clock-perl/current/t/parse.t?rev=58847&op=diff
==============================================================================
--- branches/upstream/libtime-clock-perl/current/t/parse.t (original)
+++ branches/upstream/libtime-clock-perl/current/t/parse.t Fri Jun  4 11:45:04 2010
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Test::More tests => 31;
+use Test::More tests => 32;
 
 use Time::Clock;
 
@@ -56,6 +56,7 @@
 eval { $t->parse('24:01') };
 ok($@ =~ /only allowed if/,  'parse fail 24:01');
 
+ok(eval { $t->parse('7:41:50.1272602510') }, 'extended fractional seconds');
 
 if($Have_HiRes_Time)
 {




More information about the Pkg-perl-cvs-commits mailing list