r11292 - in /branches/upstream/libemail-date-perl/current: Changes META.yml Makefile.PL lib/Email/Date.pm t/test.t

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Mon Dec 17 16:59:35 UTC 2007


Author: gregoa-guest
Date: Mon Dec 17 16:59:34 2007
New Revision: 11292

URL: http://svn.debian.org/wsvn/?sc=1&rev=11292
Log:
[svn-upgrade] Integrating new upstream version, libemail-date-perl (1.103)

Modified:
    branches/upstream/libemail-date-perl/current/Changes
    branches/upstream/libemail-date-perl/current/META.yml
    branches/upstream/libemail-date-perl/current/Makefile.PL
    branches/upstream/libemail-date-perl/current/lib/Email/Date.pm
    branches/upstream/libemail-date-perl/current/t/test.t

Modified: branches/upstream/libemail-date-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-date-perl/current/Changes?rev=11292&op=diff
==============================================================================
--- branches/upstream/libemail-date-perl/current/Changes (original)
+++ branches/upstream/libemail-date-perl/current/Changes Mon Dec 17 16:59:34 2007
@@ -1,3 +1,6 @@
+1.103   2007-11-30
+        generation of dates now done by Email::Date::Format
+
 1.102   2007-03-22
         remove uneeded dep on Email::Simple
         packaging improvements

Modified: branches/upstream/libemail-date-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-date-perl/current/META.yml?rev=11292&op=diff
==============================================================================
--- branches/upstream/libemail-date-perl/current/META.yml (original)
+++ branches/upstream/libemail-date-perl/current/META.yml Mon Dec 17 16:59:34 2007
@@ -1,13 +1,14 @@
 --- #YAML:1.0
 name:                Email-Date
-version:             1.102
+version:             1.103
 abstract:            Find and Format Date Headers
 license:             perl
-generated_by:        ExtUtils::MakeMaker version 6.32
+generated_by:        ExtUtils::MakeMaker version 6.36_01
 distribution_type:   module
 requires:     
     Date::Parse:                   2.27
     Email::Abstract:               2.10
+    Email::Date::Format:           1.000
     Test::More:                    0.47
     Time::Local:                   1.07
     Time::Piece:                   1.08

Modified: branches/upstream/libemail-date-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-date-perl/current/Makefile.PL?rev=11292&op=diff
==============================================================================
--- branches/upstream/libemail-date-perl/current/Makefile.PL (original)
+++ branches/upstream/libemail-date-perl/current/Makefile.PL Mon Dec 17 16:59:34 2007
@@ -7,11 +7,12 @@
   NAME          => 'Email::Date',
   (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
   PREREQ_PM     => {
-    'Date::Parse'     => '2.27',
-    'Email::Abstract' => '2.10', # ->new method
-    'Test::More'      => '0.47',
-    'Time::Local'     => '1.07',
-    'Time::Piece'     => '1.08',
+    'Date::Parse'         => '2.27',
+    'Email::Abstract'     => '2.10', # ->new method
+    'Email::Date::Format' => '1.000',
+    'Test::More'          => '0.47',
+    'Time::Local'         => '1.07',
+    'Time::Piece'         => '1.08',
   },
   VERSION_FROM  => 'lib/Email/Date.pm',
 );

Modified: branches/upstream/libemail-date-perl/current/lib/Email/Date.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-date-perl/current/lib/Email/Date.pm?rev=11292&op=diff
==============================================================================
--- branches/upstream/libemail-date-perl/current/lib/Email/Date.pm (original)
+++ branches/upstream/libemail-date-perl/current/lib/Email/Date.pm Mon Dec 17 16:59:34 2007
@@ -2,14 +2,14 @@
 use strict;
 
 use vars qw[$VERSION @EXPORT @EXPORT_OK];
-$VERSION = '1.102';
+$VERSION = '1.103';
 @EXPORT    = qw[find_date format_date];
 @EXPORT_OK = qw[format_gmdate];
 
 use base qw[Exporter];
 use Date::Parse ();
+use Email::Date::Format;
 use Time::Piece ();
-use Time::Local ();
 
 =head1 NAME
 
@@ -106,44 +106,9 @@
 
 =cut
 
-sub _tz_diff {
-    my ($time) = @_;
-
-    my $diff  =   Time::Local::timegm(localtime $time)
-                - Time::Local::timegm(gmtime    $time);
-
-    my $direc = $diff < 0 ? '-' : '+';
-       $diff  = abs $diff;
-    my $tz_hr = int( $diff / 3600 );
-    my $tz_mi = int( $diff / 60 - $tz_hr * 60 );
-
-    return ($direc, $tz_hr, $tz_mi);
-}
-
-sub _format_date {
-    my ($local) = @_;
-
-    sub {
-        my ($time) = @_;
-        $time = time unless defined $time;
-
-        my ($sec, $min, $hour, $mday, $mon, $year, $wday) =
-          $local ? (localtime $time) : (gmtime $time);
-        my $day   = (qw[Sun Mon Tue Wed Thu Fri Sat])[$wday];
-        my $month = (qw[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec])[$mon];
-        $year += 1900;
-        
-        my ($direc, $tz_hr, $tz_mi) = $local ? _tz_diff($time)
-                                             : ('+', 0, 0);
-        
-        sprintf "%s, %d %s %d %02d:%02d:%02d %s%02d%02d",
-          $day, $mday, $month, $year, $hour, $min, $sec, $direc, $tz_hr, $tz_mi;
-    }
-}
-
 BEGIN {
-  *format_date   = _format_date(1);
-  *format_gmdate = _format_date(0);
+  *format_date   = \&Email::Date::Format::email_date;
+  *format_gmdate = \&Email::Date::Format::email_gmdate;
 };
 
 1;

Modified: branches/upstream/libemail-date-perl/current/t/test.t
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-date-perl/current/t/test.t?rev=11292&op=diff
==============================================================================
--- branches/upstream/libemail-date-perl/current/t/test.t (original)
+++ branches/upstream/libemail-date-perl/current/t/test.t Mon Dec 17 16:59:34 2007
@@ -1,4 +1,4 @@
-use Test::More tests => 14;
+use Test::More tests => 13;
 use strict;
 $^W = 1;
 
@@ -82,18 +82,6 @@
 
 my $birthday = 1153432704; # no, really!
 
-my $tz = sprintf "%s%02u%02u", Email::Date::_tz_diff(1153432704);
-
-SKIP: {
-    skip "test only useful in US/Eastern, -0400, not $tz", 1 if $tz ne '-0400';
-
-    is(
-        format_date(1153432704),
-        'Thu, 20 Jul 2006 17:58:24 -0400',
-        "rjbs's birthday date format properly",
-    );
-}
-
 is(
   format_gmdate(1153432704),
   'Thu, 20 Jul 2006 21:58:24 +0000',




More information about the Pkg-perl-cvs-commits mailing list