r3693 - in /packages/libtime-piece-perl/branches/upstream/current:
._Piece.xs Changes META.yml Makefile.PL Piece.pm Piece.xs Seconds.pm
t/02core.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Sep 9 20:03:10 UTC 2006
Author: gregoa-guest
Date: Sat Sep 9 20:03:09 2006
New Revision: 3693
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3693
Log:
Load /tmp/tmp.ojOnB20703/libtime-piece-perl-1.11 into
packages/libtime-piece-perl/branches/upstream/current.
Removed:
packages/libtime-piece-perl/branches/upstream/current/._Piece.xs
Modified:
packages/libtime-piece-perl/branches/upstream/current/Changes
packages/libtime-piece-perl/branches/upstream/current/META.yml
packages/libtime-piece-perl/branches/upstream/current/Makefile.PL
packages/libtime-piece-perl/branches/upstream/current/Piece.pm
packages/libtime-piece-perl/branches/upstream/current/Piece.xs
packages/libtime-piece-perl/branches/upstream/current/Seconds.pm
packages/libtime-piece-perl/branches/upstream/current/t/02core.t
Modified: packages/libtime-piece-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/Changes?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/Changes (original)
+++ packages/libtime-piece-perl/branches/upstream/current/Changes Sat Sep 9 20:03:09 2006
@@ -1,5 +1,13 @@
Time::Piece Changes
+
+1.11
+ - Skip %V test on Win32
+
+1.10
+ - Number of bug fixes from RT
+ - (maintenance by Ricardo SIGNES)
+ - avoid warning in _mktime (bug #19677)
1.09
- (patches from Ricardo SIGNES)
Modified: packages/libtime-piece-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/META.yml?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/META.yml (original)
+++ packages/libtime-piece-perl/branches/upstream/current/META.yml Sat Sep 9 20:03:09 2006
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Time-Piece
-version: 1.09
+version: 1.11
version_from: Piece.pm
installdirs: site
requires:
Modified: packages/libtime-piece-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/Makefile.PL?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/libtime-piece-perl/branches/upstream/current/Makefile.PL Sat Sep 9 20:03:09 2006
@@ -1,6 +1,7 @@
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+
+require 5.006;
+
WriteMakefile(
'NAME' => 'Time::Piece',
'VERSION_FROM' => 'Piece.pm', # finds $VERSION
Modified: packages/libtime-piece-perl/branches/upstream/current/Piece.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/Piece.pm?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/Piece.pm (original)
+++ packages/libtime-piece-perl/branches/upstream/current/Piece.pm Sat Sep 9 20:03:09 2006
@@ -1,9 +1,8 @@
-# $Id: Piece.pm,v 1.16.2.2 2006/02/11 12:55:26 rjbs Exp $
+# $Id: Piece.pm 70 2006-09-07 17:43:38Z matt $
package Time::Piece;
use strict;
-use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS);
require Exporter;
require DynaLoader;
@@ -12,18 +11,18 @@
use Time::Local;
use UNIVERSAL qw(isa);
- at ISA = qw(Exporter DynaLoader);
-
- at EXPORT = qw(
+our @ISA = qw(Exporter DynaLoader);
+
+our @EXPORT = qw(
localtime
gmtime
);
-%EXPORT_TAGS = (
+our %EXPORT_TAGS = (
':override' => 'internal',
);
-$VERSION = '1.09';
+our $VERSION = '1.11';
bootstrap Time::Piece $VERSION;
@@ -98,10 +97,12 @@
sub _mktime {
my ($class, $time, $islocal) = @_;
- $class = eval { (ref $class)->isa('Time::Piece') } ? ref $class : $class;
+ $class = eval { (ref $class) && (ref $class)->isa('Time::Piece') }
+ ? ref $class
+ : $class;
if (ref($time)) {
- $time->[c_epoch] = undef;
- return wantarray ? @$time : bless [@$time, $islocal], $class;
+ $time->[c_epoch] = undef;
+ return wantarray ? @$time : bless [@$time, $islocal], $class;
}
_tzset();
my @time = $islocal ?
@@ -121,6 +122,7 @@
for my $method (@methods) {
if (exists $_special_exports{$method}) {
no strict 'refs';
+ no warnings 'redefine';
*{$to . "::$method"} = $_special_exports{$method}->($class);
} else {
$class->SUPER::export($to, $method);
@@ -280,6 +282,8 @@
# Thanks to Tony Olekshy <olekshy at cs.ualberta.ca> for this algorithm
sub tzoffset {
my $time = shift;
+
+ return Time::Seconds->new(0) unless $time->[c_islocal];
my $epoch = $time->epoch;
@@ -302,15 +306,15 @@
sub epoch {
my $time = shift;
if (defined($time->[c_epoch])) {
- return $time->[c_epoch];
- }
- else {
- my $epoch = $time->[c_islocal] ?
- timelocal(@{$time}[c_sec .. c_mon], $time->[c_year]+1900)
- :
- timegm(@{$time}[c_sec .. c_mon], $time->[c_year]+1900);
- $time->[c_epoch] = $epoch;
- return $epoch;
+ return $time->[c_epoch];
+ }
+ else {
+ my $epoch = $time->[c_islocal] ?
+ timelocal(@{$time}[c_sec .. c_mon], $time->[c_year]+1900)
+ :
+ timegm(@{$time}[c_sec .. c_mon], $time->[c_year]+1900);
+ $time->[c_epoch] = $epoch;
+ return $epoch;
}
}
@@ -446,14 +450,15 @@
sub strftime {
my $time = shift;
- my $format = @_ ? shift(@_) : "%a, %d %b %Y %H:%M:%S %Z";
+ my $tzname = $time->[c_islocal] ? '%Z' : 'UTC';
+ my $format = @_ ? shift(@_) : "%a, %d %b %Y %H:%M:%S $tzname";
if (!defined $time->[c_wday]) {
- if ($time->[c_islocal]) {
+ if ($time->[c_islocal]) {
return _strftime($format, CORE::localtime($time->epoch));
- }
- else {
- return _strftime($format, CORE::gmtime($time->epoch));
- }
+ }
+ else {
+ return _strftime($format, CORE::gmtime($time->epoch));
+ }
}
return _strftime($format, (@$time)[c_sec..c_isdst]);
}
Modified: packages/libtime-piece-perl/branches/upstream/current/Piece.xs
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/Piece.xs?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/Piece.xs (original)
+++ packages/libtime-piece-perl/branches/upstream/current/Piece.xs Sat Sep 9 20:03:09 2006
@@ -23,7 +23,7 @@
* support is added and NETaa14816 is considered in full.
* It does not address tzname aspects of NETaa14816.
*/
-#ifdef HAS_GNULIBC
+#if !defined(HAS_GNULIBC)
# ifndef STRUCT_TM_HASZONE
# define STRUCT_TM_HASZONE
# else
@@ -816,6 +816,7 @@
char tmpbuf[128];
struct tm mytm;
int len;
+ memset(&mytm, 0, sizeof(mytm));
my_init_tm(&mytm); /* XXX workaround - see my_init_tm() above */
mytm.tm_sec = sec;
mytm.tm_min = min;
Modified: packages/libtime-piece-perl/branches/upstream/current/Seconds.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/Seconds.pm?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/Seconds.pm (original)
+++ packages/libtime-piece-perl/branches/upstream/current/Seconds.pm Sat Sep 9 20:03:09 2006
@@ -1,4 +1,4 @@
-# $Id: Seconds.pm,v 1.11 2002/09/08 20:51:38 matt Exp $
+# $Id: Seconds.pm 69 2006-09-07 17:41:05Z matt $
package Time::Seconds;
use strict;
Modified: packages/libtime-piece-perl/branches/upstream/current/t/02core.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtime-piece-perl/branches/upstream/current/t/02core.t?rev=3693&op=diff
==============================================================================
--- packages/libtime-piece-perl/branches/upstream/current/t/02core.t (original)
+++ packages/libtime-piece-perl/branches/upstream/current/t/02core.t Sat Sep 9 20:03:09 2006
@@ -93,8 +93,11 @@
cmp_ok($t->strftime('%U'), 'eq', '09'); # Sun cmp Mon
-# is this test really broken on Mac OS? -- rjbs, 2006-02-08
-cmp_ok($t->strftime('%V'), 'eq', '09'); # Sun cmp Mon
+SKIP: {
+ skip "can't strftime %V on Win32", 1 if $is_win32;
+ # is this test really broken on Mac OS? -- rjbs, 2006-02-08
+ cmp_ok($t->strftime('%V'), 'eq', '09'); # Sun cmp Mon
+}
cmp_ok($t->strftime('%w'), '==', 2);
cmp_ok($t->strftime('%W'), 'eq', '09'); # Sun cmp Mon
More information about the Pkg-perl-cvs-commits
mailing list