[perl-Catalyst-Model-DBIC-Schema/f19] Restore compatibility with Data-Dumper-2.151

Petr Pisar ppisar at fedoraproject.org
Fri Apr 11 14:24:56 UTC 2014


commit bf5dc3121820404c54aeeae3d9e128215f1c399e
Author: Petr Písař <ppisar at redhat.com>
Date:   Fri Apr 11 16:16:40 2014 +0200

    Restore compatibility with Data-Dumper-2.151

 ...hema-0.62-Adjust-test-to-Data-Dumer-2.151.patch |   61 ++++++++++++++++++++
 perl-Catalyst-Model-DBIC-Schema.spec               |    8 ++-
 2 files changed, 68 insertions(+), 1 deletions(-)
---
diff --git a/Catalyst-Model-DBIC-Schema-0.62-Adjust-test-to-Data-Dumer-2.151.patch b/Catalyst-Model-DBIC-Schema-0.62-Adjust-test-to-Data-Dumer-2.151.patch
new file mode 100644
index 0000000..82d678e
--- /dev/null
+++ b/Catalyst-Model-DBIC-Schema-0.62-Adjust-test-to-Data-Dumer-2.151.patch
@@ -0,0 +1,61 @@
+From 13325b238c8c1b854a14e9c5a9a270b16b87614d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 11 Apr 2014 16:05:40 +0200
+Subject: [PATCH] Adjust test to Data-Dumer-2.151
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Data-Dumper-2.151 changed regular expression Dumper format:
+
+Before:
+
+$ perl -MData::Dumper -e '$q=qr/^(foo|bar)$/; print $q, qq{\n}; print Dumper($q)'
+(?^:^(foo|bar)$)
+$VAR1 = qr/(?^:^(foo|bar)$)/;
+
+After:
+
+$ perl -MData::Dumper -e '$q=qr/^(foo|bar)$/; print $q, qq{\n}; print Dumper($q)'
+(?^:^(foo|bar)$)
+$VAR1 = qr/^(foo|bar)$/;
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ t/08helper.t | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/t/08helper.t b/t/08helper.t
+index 09ae5eb..31de2bd 100644
+--- a/t/08helper.t
++++ b/t/08helper.t
+@@ -9,6 +9,7 @@ use Test::Exception;
+ use Catalyst::Helper::Model::DBIC::Schema;
+ use Storable 'dclone';
+ use Test::Requires qw(Catalyst::Helper DBIx::Class::Schema::Loader);
++require Data::Dumper;
+ 
+ my $helper      = Catalyst::Helper->new;
+ $helper->{base} = $Bin;
+@@ -72,12 +73,15 @@ $i = instance(args => [$static, q{components=TimeStamp,Foo}]);
+ is_deeply $i->components, ['InflateColumn::DateTime', 'TimeStamp', 'Foo'],
+     'two extra components';
+ 
+-my $flags = qr// =~ /\^/ ? '^' : "-xism";
++my $expected_dumper_output = qq{qr/^(foo|bar)\$/};
++if ($Data::Dumper::VERSION < 2.151) {
++    my $flags = qr// =~ /\^/ ? '^' : "-xism";
++    $expected_dumper_output = qq{qr/(?$flags:^(foo|bar)\$)/};
++}
+ $i = instance(args => [$static, q{constraint=^(foo|bar)$}]);
+ is $i->loader_args->{constraint}, qr/^(foo|bar)$/,
+     'constraint loader arg';
+-is $i->helper->{loader_args}{constraint},
+-    qq{qr/(?$flags:^(foo|bar)\$)/},
++is $i->helper->{loader_args}{constraint}, $expected_dumper_output,
+     'constraint loader arg as string';
+ 
+ $i = instance(args => [$static, q{exclude=^(foo|bar)$}]);
+-- 
+1.9.0
+
diff --git a/perl-Catalyst-Model-DBIC-Schema.spec b/perl-Catalyst-Model-DBIC-Schema.spec
index a1f4f6a..0cc779a 100644
--- a/perl-Catalyst-Model-DBIC-Schema.spec
+++ b/perl-Catalyst-Model-DBIC-Schema.spec
@@ -1,10 +1,12 @@
 Name:           perl-Catalyst-Model-DBIC-Schema
 Summary:        DBIx::Class::Schema Model Class
 Version:        0.60
-Release:        4%{?dist}
+Release:        5%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/R/RK/RKITOVER/Catalyst-Model-DBIC-Schema-%{version}.tar.gz
+# Restore compatibility with Data-Dumper-2.151, bug #1085905, CPAN RT#94599
+Patch0:         Catalyst-Model-DBIC-Schema-0.62-Adjust-test-to-Data-Dumer-2.151.patch
 URL:            http://search.cpan.org/dist/Catalyst-Model-DBIC-Schema/
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 BuildArch:      noarch
@@ -62,6 +64,7 @@ generating these Models via Helper scripts.
 
 %prep
 %setup -q -n Catalyst-Model-DBIC-Schema-%{version}
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -83,6 +86,9 @@ TEST_POD=1 C_M_DBIC_SCHEMA_TESTAPP=1 make test
 %{_mandir}/man3/*
 
 %changelog
+* Fri Apr 11 2014 Petr Pisar <ppisar at redhat.com> - 0.60-5
+- Restore compatibility with Data-Dumper-2.151 (bug #1085905)
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.60-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 



More information about the perl-devel mailing list