r58852 - in /trunk/libtime-clock-perl: Changes META.yml debian/changelog 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:50:11 UTC 2010


Author: ansgar-guest
Date: Fri Jun  4 11:49:49 2010
New Revision: 58852

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58852
Log:
New upstream release.

Modified:
    trunk/libtime-clock-perl/Changes
    trunk/libtime-clock-perl/META.yml
    trunk/libtime-clock-perl/debian/changelog
    trunk/libtime-clock-perl/lib/Time/Clock.pm
    trunk/libtime-clock-perl/t/math.t
    trunk/libtime-clock-perl/t/parse.t

Modified: trunk/libtime-clock-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/Changes?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/Changes (original)
+++ trunk/libtime-clock-perl/Changes Fri Jun  4 11:49:49 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: trunk/libtime-clock-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/META.yml?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/META.yml (original)
+++ trunk/libtime-clock-perl/META.yml Fri Jun  4 11:49:49 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: trunk/libtime-clock-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/changelog?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/changelog (original)
+++ trunk/libtime-clock-perl/debian/changelog Fri Jun  4 11:49:49 2010
@@ -1,3 +1,9 @@
+libtime-clock-perl (1.01-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Fri, 04 Jun 2010 20:49:13 +0900
+
 libtime-clock-perl (1.00-1) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libtime-clock-perl/lib/Time/Clock.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/lib/Time/Clock.pm?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/lib/Time/Clock.pm (original)
+++ trunk/libtime-clock-perl/lib/Time/Clock.pm Fri Jun  4 11:49:49 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: trunk/libtime-clock-perl/t/math.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/t/math.t?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/t/math.t (original)
+++ trunk/libtime-clock-perl/t/math.t Fri Jun  4 11:49:49 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: trunk/libtime-clock-perl/t/parse.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/t/parse.t?rev=58852&op=diff
==============================================================================
--- trunk/libtime-clock-perl/t/parse.t (original)
+++ trunk/libtime-clock-perl/t/parse.t Fri Jun  4 11:49:49 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