[libdatetime-timezone-perl] 01/04: Fix warning for loading object from a different Olson release

gregor herrmann gregoa at debian.org
Wed Apr 15 19:03:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag v1.80
in repository libdatetime-timezone-perl.

commit 4a160435bbbc6610853e4fede3f82a942e8d24db
Author: Dave Rolsky <autarch at urth.org>
Date:   Sat Nov 15 11:11:51 2014 -0600

    Fix warning for loading object from a different Olson release
---
 Changes                   | 6 ++++++
 lib/DateTime/TimeZone.pm  | 2 +-
 t/18olson-version-check.t | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Changes b/Changes
index 8a9bbd7..13be12d 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
 {{$NEXT}}
 
+- Tweaked the warning when loading a zone class from disk that was generated
+  using a different Olson version than the current DateTime::TimeZone
+  module. Previously, it said the loaded version was older, but all we know is
+  that it's different. Reported by Karen Etheridge. RT #66097.
+
+
 1.79    2014-11-11
 
 - This release is based on version 2014j of the Olson database. This release
diff --git a/lib/DateTime/TimeZone.pm b/lib/DateTime/TimeZone.pm
index da4246a..6b2b509 100644
--- a/lib/DateTime/TimeZone.pm
+++ b/lib/DateTime/TimeZone.pm
@@ -108,7 +108,7 @@ sub new {
 
         if ( $object_version ne $catalog_version ) {
             warn
-                "Loaded $real_class, which is from an older version ($object_version) of the Olson database than this installation of DateTime::TimeZone ($catalog_version).\n";
+                "Loaded $real_class, which is from a different version ($object_version) of the Olson database than this installation of DateTime::TimeZone ($catalog_version).\n";
         }
     }
 
diff --git a/t/18olson-version-check.t b/t/18olson-version-check.t
index 2787d74..0324191 100644
--- a/t/18olson-version-check.t
+++ b/t/18olson-version-check.t
@@ -13,7 +13,7 @@ BEGIN { require 'check_datetime_version.pl' }
 {
     stderr_like(
         sub { DateTime::TimeZone->new( name => 'Fake/TZ' ) },
-        qr/\Qfrom an older version (unknown)/,
+        qr/\Qfrom a different version (unknown)/,
         'loading timezone where olson version is not defined'
     );
 }
@@ -21,7 +21,7 @@ BEGIN { require 'check_datetime_version.pl' }
 {
     stderr_like(
         sub { DateTime::TimeZone->new( name => 'Fake/TZ2' ) },
-        qr/\Qfrom an older version (2000a)/,
+        qr/\Qfrom a different version (2000a)/,
         'loading timezone where olson version is older than current'
     );
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdatetime-timezone-perl.git



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