diff --git a/.gitignore b/.gitignore index e69de29..b6ed98c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/MooX-Struct-0.013.tar.gz diff --git a/MooX-Struct-0.013-Add-return_value-dump-for-Data-Printer.patch b/MooX-Struct-0.013-Add-return_value-dump-for-Data-Printer.patch new file mode 100644 index 0000000..e56f895 --- /dev/null +++ b/MooX-Struct-0.013-Add-return_value-dump-for-Data-Printer.patch @@ -0,0 +1,33 @@ +From daea5fa51e652449fd986b8a69c3da952018be6d Mon Sep 17 00:00:00 2001 +From: Andreas Marienborg +Date: Wed, 5 Aug 2015 15:58:29 +0700 +Subject: [PATCH] Add return_value => 'dump' for Data::Printer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is required as of version 0.36 of Data::Printer, where the default for +return_value changed from 'dump' to 'pass'. Since we rely on getting the dump +back, we need to tell Data::Printer that + +Signed-off-by: Petr Písař +--- + t/97dataprinter.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/97dataprinter.t b/t/97dataprinter.t +index e2dfc69..652e8ba 100644 +--- a/t/97dataprinter.t ++++ b/t/97dataprinter.t +@@ -25,7 +25,7 @@ use if !eval{ require Data::Printer }, + + use Test::More; + +-use Data::Printer colored => 0; ++use Data::Printer colored => 0, return_value => 'dump'; + use MooX::Struct Something => [qw( $foo bar )]; + + my $obj = Something->new(foo => 1, bar => 2); +-- +2.5.5 + diff --git a/perl-MooX-Struct.spec b/perl-MooX-Struct.spec new file mode 100644 index 0000000..5e386d2 --- /dev/null +++ b/perl-MooX-Struct.spec @@ -0,0 +1,81 @@ +Name: perl-MooX-Struct +Version: 0.013 +Release: 1%{?dist} +Summary: Record structure-like Moo classes +# CONTRIBUTING: CC-BY-SA +# COPYRIGHT: Public Domain +# other files: GPL+ or Artistic +License: (GPL+ or Artistic) and CC-BY-SA and Public Domain +Group: Development/Libraries +URL: http://search.cpan.org/dist/MooX-Struct/ +Source0: http://www.cpan.org/authors/id/T/TO/TOBYINK/MooX-Struct-%{version}.tar.gz +# Adapt tests to Data-Printer-0.36, CPAN RT#104895 +Patch0: MooX-Struct-0.013-Add-return_value-dump-for-Data-Printer.patch +BuildArch: noarch +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 +BuildRequires: perl(strict) +# Run-time: +BuildRequires: perl(:VERSION) >= 5.8 +BuildRequires: perl(B::Deparse) +BuildRequires: perl(B::Hooks::EndOfScope) +BuildRequires: perl(Carp) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Data::OptList) +BuildRequires: perl(Data::Printer::Filter) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(Moo) >= 1.000000 +BuildRequires: perl(Moo::Role) +BuildRequires: perl(namespace::clean) +BuildRequires: perl(Object::ID) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Does) +BuildRequires: perl(Sub::Install) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +# Tests: +BuildRequires: perl(if) +BuildRequires: perl(Test::More) >= 0.61 +# Optional tests: +BuildRequires: perl(Data::Printer) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(B::Deparse) +Requires: perl(Data::Dumper) +Requires: perl(Data::Printer::Filter) +Requires: perl(IO::Handle) +Requires: perl(Moo::Role) +Requires: perl(Term::ANSIColor) + +%description +MooX::Struct allows you to create cheap struct-like classes for your data +using Moo. + +%prep +%setup -q -n MooX-Struct-%{version} +%patch0 -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -delete +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%license LICENSE +%doc Changes CONTRIBUTING COPYRIGHT CREDITS NEWS README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Thu Jun 23 2016 Petr Pisar 0.013-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..834cb62 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +593e8c109a177d81569ac83b4954ec11 MooX-Struct-0.013.tar.gz