Skip to content

Commit

Permalink
cpan/Time-Piece - Update to version 1.35
Browse files Browse the repository at this point in the history
1.35    2025-01-06
        - Convert tests from Test.pm to Test::More
        - Eliminate C++ guards
        - Fix minor typoes/spelling mistakes in comments/docs
  • Loading branch information
leonerd committed Jan 17, 2025
1 parent 8542129 commit 6108f8a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 25 deletions.
14 changes: 7 additions & 7 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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' => {
Expand Down
2 changes: 1 addition & 1 deletion cpan/Time-Piece/Seconds.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Time::Seconds;
use strict;

our $VERSION = '1.3401';
our $VERSION = '1.35';

use Exporter 5.57 'import';

Expand Down
9 changes: 5 additions & 4 deletions cpan/Time-Piece/t/04mjd.t
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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});

}

8 changes: 5 additions & 3 deletions cpan/Time-Piece/t/05overload.t
Original file line number Diff line number Diff line change
@@ -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");

4 changes: 1 addition & 3 deletions cpan/Time-Piece/t/10overload.t
Original file line number Diff line number Diff line change
@@ -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 $@;
Expand All @@ -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;
2 changes: 1 addition & 1 deletion cpan/Time-Piece/t/lib/Time/Piece/Twin.pm
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 6108f8a

Please sign in to comment.