[perl-MooseX-Types-DateTime-ButMaintained] Accept DateTime::TimeZone::Tzfile object in place of DateTime::TimeZone

Petr Pisar ppisar at fedoraproject.org
Thu Sep 4 12:51:04 UTC 2014


commit ee0e1efab96817ee4bfb6100ba31b5a29d5b55e4
Author: Petr Písař <ppisar at redhat.com>
Date:   Thu Sep 4 14:07:38 2014 +0200

    Accept DateTime::TimeZone::Tzfile object in place of DateTime::TimeZone

 ...Time-TimeZone-Tzfile-object-in-place-of-D.patch |   46 ++++++++++++++++++++
 perl-MooseX-Types-DateTime-ButMaintained.spec      |   10 ++++-
 2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/MooseX-Types-DateTime-ButMaintained-0.16-Accept-DateTime-TimeZone-Tzfile-object-in-place-of-D.patch b/MooseX-Types-DateTime-ButMaintained-0.16-Accept-DateTime-TimeZone-Tzfile-object-in-place-of-D.patch
new file mode 100644
index 0000000..2b98da2
--- /dev/null
+++ b/MooseX-Types-DateTime-ButMaintained-0.16-Accept-DateTime-TimeZone-Tzfile-object-in-place-of-D.patch
@@ -0,0 +1,46 @@
+From c53d6ce32d2e4420fcac3f2d68547c3b07e4fce6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Thu, 4 Sep 2014 14:02:55 +0200
+Subject: [PATCH] Accept DateTime::TimeZone::Tzfile object in place of
+ DateTime::TimeZone
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+After fixing <https://bugzilla.redhat.com/show_bug.cgi?id=1135981> by
+returning DateTime::TimeZone::Tzfile, we need to allow this class in
+this library.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1138185
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/MooseX/Types/DateTime/ButMaintained.pm | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/MooseX/Types/DateTime/ButMaintained.pm b/lib/MooseX/Types/DateTime/ButMaintained.pm
+index 458d9a5..44bf3aa 100644
+--- a/lib/MooseX/Types/DateTime/ButMaintained.pm
++++ b/lib/MooseX/Types/DateTime/ButMaintained.pm
+@@ -10,7 +10,7 @@ use DateTime::Locale ();
+ use DateTime::TimeZone ();
+ use Olson::Abbreviations 0.03 qw();
+ 
+-use MooseX::Types::Moose 0.30 qw/Num HashRef Str/;
++use MooseX::Types::Moose 0.30 qw/Num HashRef Str Object/;
+ 
+ use MooseX::Types 0.30 -declare => [qw( DateTime Duration TimeZone Locale Now )];
+ 
+@@ -23,7 +23,9 @@ class_type "DateTime::Locale::root" => { name => "DateTime::Locale" };
+ 
+ subtype DateTime, as 'DateTime';
+ subtype Duration, as 'DateTime::Duration';
+-subtype TimeZone, as 'DateTime::TimeZone';
++subtype TimeZone, as Object, where {
++    $_->isa('DateTime::TimeZone') || $_->isa('DateTime::TimeZone::Tzfile')
++};
+ subtype Locale,   as 'DateTime::Locale';
+ 
+ subtype( Now, as Str, where { $_ eq 'now' },
+-- 
+1.9.3
+
diff --git a/perl-MooseX-Types-DateTime-ButMaintained.spec b/perl-MooseX-Types-DateTime-ButMaintained.spec
index 86d964b..6d4005f 100644
--- a/perl-MooseX-Types-DateTime-ButMaintained.spec
+++ b/perl-MooseX-Types-DateTime-ButMaintained.spec
@@ -1,11 +1,14 @@
 Name:           perl-MooseX-Types-DateTime-ButMaintained
 Version:        0.16
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        DateTime related constraints and coercions for Moose
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/MooseX-Types-DateTime-ButMaintained/
 Source0:        http://www.cpan.org/authors/id/E/EC/ECARROLL/MooseX-Types-DateTime-ButMaintained-%{version}.tar.gz
+# Accept DateTime::TimeZone::Tzfile object in place of DateTime::TimeZone,
+# bug #1138185
+Patch0:         MooseX-Types-DateTime-ButMaintained-0.16-Accept-DateTime-TimeZone-Tzfile-object-in-place-of-D.patch
 BuildArch:      noarch
 BuildRequires:  perl(ExtUtils::MakeMaker)
 # Run-time:
@@ -41,6 +44,7 @@ designed to work with the DateTime suite of objects.
 
 %prep
 %setup -q -n MooseX-Types-DateTime-ButMaintained-%{version}
+%patch0 -p1
 
 %build
 # switch off cpan installation
@@ -62,6 +66,10 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Thu Sep 04 2014 Petr Pisar <ppisar at redhat.com> - 0.16-7
+- Accept DateTime::TimeZone::Tzfile object in place of DateTime::TimeZone (bug
+  #1138185)
+
 * Mon Sep 01 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.16-6
 - Perl 5.20 rebuild
 


More information about the scm-commits mailing list