From 6108f8ad0077a18a13134d372d9460cad29a3ef7 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 17 Jan 2025 15:28:31 +0000 Subject: [PATCH] cpan/Time-Piece - Update to version 1.35 1.35 2025-01-06 - Convert tests from Test.pm to Test::More - Eliminate C++ guards - Fix minor typoes/spelling mistakes in comments/docs --- MANIFEST | 14 +++++++------- Porting/Maintainers.pl | 8 ++------ cpan/Time-Piece/Seconds.pm | 2 +- cpan/Time-Piece/t/04mjd.t | 9 +++++---- cpan/Time-Piece/t/05overload.t | 8 +++++--- cpan/Time-Piece/t/10overload.t | 4 +--- cpan/Time-Piece/t/lib/Time/Piece/Twin.pm | 2 +- 7 files changed, 22 insertions(+), 25 deletions(-) diff --git a/MANIFEST b/MANIFEST index 9d737c7cf8ec..0c3acb54d797 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3169,18 +3169,18 @@ cpan/Time-Piece/Piece.xs Time::Piece extension cpan/Time-Piece/Seconds.pm Time::Piece extension cpan/Time-Piece/t/01base.t Test for Time::Piece cpan/Time-Piece/t/02core.t Test for Time::Piece -cpan/Time-Piece/t/02core_dst.t +cpan/Time-Piece/t/02core_dst.t Test file related to Time::Piece cpan/Time-Piece/t/03compare.t Test for Time::Piece cpan/Time-Piece/t/04mjd.t Test for Time::Piece cpan/Time-Piece/t/05overload.t Test for Time::Piece -cpan/Time-Piece/t/06large.t +cpan/Time-Piece/t/06large.t Test file related to Time::Piece cpan/Time-Piece/t/06subclass.t Test for Time::Piece cpan/Time-Piece/t/07arith.t Test for Time::Piece -cpan/Time-Piece/t/08truncate.t -cpan/Time-Piece/t/09locales.t -cpan/Time-Piece/t/10overload.t -cpan/Time-Piece/t/99legacy.t -cpan/Time-Piece/t/lib/Time/Piece/Twin.pm +cpan/Time-Piece/t/08truncate.t Test file related to Time::Piece +cpan/Time-Piece/t/09locales.t Test file related to Time::Piece +cpan/Time-Piece/t/10overload.t Test file related to Time::Piece +cpan/Time-Piece/t/99legacy.t Test file related to Time::Piece +cpan/Time-Piece/t/lib/Time/Piece/Twin.pm Module related to Time::Piece cpan/Unicode-Collate/Collate.pm Unicode::Collate cpan/Unicode-Collate/Collate.xs Unicode::Collate cpan/Unicode-Collate/Collate/allkeys.txt Unicode::Collate diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index b6f86c904d02..bcd834d467a8 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1246,14 +1246,10 @@ package Maintainers; }, 'Time::Piece' => { - 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.3401.tar.gz', + 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.35.tar.gz', + 'SYNCINFO' => 'LeoNerd on Fri Jan 17 15:27:02 2025', 'FILES' => q[cpan/Time-Piece], 'EXCLUDED' => [ qw[reverse_deps.txt] ], - 'CUSTOMIZED' => [ - # https://github.com/Dual-Life/Time-Piece/pull/64 - 'Piece.pm', - 'Piece.xs' - ], }, 'Unicode::Collate' => { diff --git a/cpan/Time-Piece/Seconds.pm b/cpan/Time-Piece/Seconds.pm index 6aa864d97eca..98b21d3e46cc 100644 --- a/cpan/Time-Piece/Seconds.pm +++ b/cpan/Time-Piece/Seconds.pm @@ -1,7 +1,7 @@ package Time::Seconds; use strict; -our $VERSION = '1.3401'; +our $VERSION = '1.35'; use Exporter 5.57 'import'; diff --git a/cpan/Time-Piece/t/04mjd.t b/cpan/Time-Piece/t/04mjd.t index eae8e25cbbf5..53aa00b0bfa6 100644 --- a/cpan/Time-Piece/t/04mjd.t +++ b/cpan/Time-Piece/t/04mjd.t @@ -1,5 +1,6 @@ -use Test; -BEGIN { plan tests => 12 } +use strict; +use warnings; +use Test::More tests => 12; # Test the calculation of (modified) Julian date use Time::Piece; @@ -22,12 +23,12 @@ for my $time (keys %mjd) { # First check using GMT my $tp = gmtime( $time ); - ok(sprintf("%.3f",$tp->mjd),$mjd{$time}); + is(sprintf("%.3f",$tp->mjd),$mjd{$time}); # Now localtime should give the same answer for MJD # since MJD is always referred to as UT $tp = localtime( $time ); - ok(sprintf("%.3f",$tp->mjd),$mjd{$time}); + is(sprintf("%.3f",$tp->mjd),$mjd{$time}); } diff --git a/cpan/Time-Piece/t/05overload.t b/cpan/Time-Piece/t/05overload.t index 674cc94efdb5..c9674856ac65 100644 --- a/cpan/Time-Piece/t/05overload.t +++ b/cpan/Time-Piece/t/05overload.t @@ -1,9 +1,11 @@ # Tests for overloads (+,-,<,>, etc) -use Test; -BEGIN { plan tests => 1 } +use strict; +use warnings; + +use Test::More tests => 1; use Time::Piece; my $t = localtime; my $s = Time::Seconds->new(15); eval { my $result = $t + $s }; -ok($@, "", "Adding Time::Seconds does not cause runtime error"); +is($@, "", "Adding Time::Seconds does not cause runtime error"); diff --git a/cpan/Time-Piece/t/10overload.t b/cpan/Time-Piece/t/10overload.t index a85b50971306..306caf4f6722 100644 --- a/cpan/Time-Piece/t/10overload.t +++ b/cpan/Time-Piece/t/10overload.t @@ -1,7 +1,7 @@ use strict; use warnings; use Time::Piece; -use Test::More; +use Test::More tests => 5; eval 'use Math::BigInt'; plan skip_all => "Math::BigInt required for testing overloaded operands" if $@; @@ -21,5 +21,3 @@ is $t->cdate, 'Tue Jan 1 01:00:00 1980', 'add overloaded value'; $t = $t - $big_hour; is $t->cdate, 'Tue Jan 1 00:00:00 1980', 'sub overloaded value'; - -done_testing; diff --git a/cpan/Time-Piece/t/lib/Time/Piece/Twin.pm b/cpan/Time-Piece/t/lib/Time/Piece/Twin.pm index 9798f83b7d0e..92a3a1ca4b19 100644 --- a/cpan/Time-Piece/t/lib/Time/Piece/Twin.pm +++ b/cpan/Time-Piece/t/lib/Time/Piece/Twin.pm @@ -1,4 +1,4 @@ # this package is identical, but will be ->isa('Time::Piece::Twin'); package Time::Piece::Twin; use base qw(Time::Piece); -our $VERSION = "0.01"; +our $VERSION = "1.35";