diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2014-09-03 13:56:59 +0100 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2014-09-03 13:56:59 +0100 |
commit | 03d59818480e6982febfc0c56de5c53013913078 (patch) | |
tree | cb423391a100d4de9a99adf20ee9b101f465f55f /cpan | |
parent | 3b422749039e6e640968237aa14f904977b285f7 (diff) | |
download | perl-03d59818480e6982febfc0c56de5c53013913078.tar.gz |
Update Time-Piece to CPAN version 1.29
[DELTA]
1.29 2014-09-01
- when pretty printing negative Time::Seconds, do not lose the "minus"
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Time-Piece/Piece.pm | 2 | ||||
-rw-r--r-- | cpan/Time-Piece/Seconds.pm | 4 | ||||
-rw-r--r-- | cpan/Time-Piece/t/02core.t | 9 |
3 files changed, 9 insertions, 6 deletions
diff --git a/cpan/Time-Piece/Piece.pm b/cpan/Time-Piece/Piece.pm index f913db99be..aaf63eebb7 100644 --- a/cpan/Time-Piece/Piece.pm +++ b/cpan/Time-Piece/Piece.pm @@ -19,7 +19,7 @@ our %EXPORT_TAGS = ( ':override' => 'internal', ); -our $VERSION = '1.27'; +our $VERSION = '1.29'; bootstrap Time::Piece $VERSION; diff --git a/cpan/Time-Piece/Seconds.pm b/cpan/Time-Piece/Seconds.pm index b001f20402..8e5b52b269 100644 --- a/cpan/Time-Piece/Seconds.pm +++ b/cpan/Time-Piece/Seconds.pm @@ -2,7 +2,7 @@ package Time::Seconds; use strict; use vars qw/@EXPORT @EXPORT_OK/; -our $VERSION = '1.27'; +our $VERSION = '1.29'; use Exporter 5.57 'import'; @@ -160,7 +160,7 @@ sub pretty { if ($s >= ONE_HOUR) { if ($s >= ONE_DAY) { my $days = sprintf("%d", $s->days); # does a "floor" - $str = $days . " days, "; + $str .= $days . " days, "; $s -= ($days * ONE_DAY); } my $hours = sprintf("%d", $s->hours); diff --git a/cpan/Time-Piece/t/02core.t b/cpan/Time-Piece/t/02core.t index 3840e879b4..18dae7d056 100644 --- a/cpan/Time-Piece/t/02core.t +++ b/cpan/Time-Piece/t/02core.t @@ -1,10 +1,11 @@ -use Test::More tests => 96; +use Test::More tests => 95; my $is_win32 = ($^O =~ /Win32/); my $is_qnx = ($^O eq 'qnx'); my $is_vos = ($^O eq 'vos'); -BEGIN { use_ok('Time::Piece'); } -ok(1); + +use Time::Piece; +use Time::Seconds; my $t = gmtime(951827696); # 2000-02-29T12:34:56 @@ -227,3 +228,5 @@ cmp_ok( 951827696 ); +my $s = Time::Seconds->new(-691050); +is($s->pretty, 'minus 7 days, 23 hours, 57 minutes, 30 seconds'); |