Data::Section::Simple is a simple module to extract data from the __DATA__ section of the file.epel9
parent
d511cebc53
commit
3239d593c9
@ -0,0 +1 @@
|
||||
/Data-Section-Simple-[0-9.]*\.tar\.gz
|
@ -0,0 +1,57 @@
|
||||
diff -up Data-Section-Simple-0.02/t/basic.t.orig Data-Section-Simple-0.02/t/basic.t
|
||||
--- Data-Section-Simple-0.02/t/basic.t.orig 2010-03-18 08:30:42.000000000 +0000
|
||||
+++ Data-Section-Simple-0.02/t/basic.t 2011-08-03 13:35:00.536119464 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use Data::Section::Simple qw(get_data_section);
|
||||
-use Test::More;
|
||||
+use Test::More tests => 3;
|
||||
|
||||
my $x = get_data_section();
|
||||
is_deeply [ sort keys %$x ], [ qw(bar.tt foo.html) ];
|
||||
@@ -19,8 +19,6 @@ bar
|
||||
|
||||
TT
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
__DATA__
|
||||
|
||||
@@ foo.html
|
||||
diff -up Data-Section-Simple-0.02/t/data.t.orig Data-Section-Simple-0.02/t/data.t
|
||||
--- Data-Section-Simple-0.02/t/data.t.orig 2010-03-18 21:59:01.000000000 +0000
|
||||
+++ Data-Section-Simple-0.02/t/data.t 2011-08-03 13:35:24.648055699 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
use lib "t";
|
||||
use DataInCode;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 1;
|
||||
use Data::Section::Simple;
|
||||
|
||||
my $d = Data::Section::Simple->new('DataInCode');
|
||||
@@ -8,7 +8,3 @@ my $x = $d->get_data_section;
|
||||
|
||||
is $x->{foo}, "bar\n\n";
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
-
|
||||
-
|
||||
diff -up Data-Section-Simple-0.02/t/pkg_oo.t.orig Data-Section-Simple-0.02/t/pkg_oo.t
|
||||
--- Data-Section-Simple-0.02/t/pkg_oo.t.orig 2010-03-18 08:26:28.000000000 +0000
|
||||
+++ Data-Section-Simple-0.02/t/pkg_oo.t 2011-08-03 13:35:51.142985668 +0100
|
||||
@@ -4,7 +4,7 @@ use Data::Section::Simple;
|
||||
use lib "t";
|
||||
use Foo;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 3;
|
||||
|
||||
my $d = Data::Section::Simple->new('Foo');
|
||||
my $x = $d->get_data_section();
|
||||
@@ -24,5 +24,3 @@ bar
|
||||
|
||||
TT
|
||||
|
||||
-done_testing;
|
||||
-
|
@ -0,0 +1,63 @@
|
||||
# We need to patch the test suite if we have an old version of Test::More
|
||||
%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0)
|
||||
|
||||
Name: perl-Data-Section-Simple
|
||||
Version: 0.02
|
||||
Release: 2%{?dist}
|
||||
Summary: Read data from __DATA__
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/Data-Section-Simple/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Data-Section-Simple-%{version}.tar.gz
|
||||
Patch1: Data-Section-Simple-0.02-old-Test::More.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
|
||||
%description
|
||||
Data::Section::Simple is a simple module to extract data from the __DATA__
|
||||
section of the file.
|
||||
|
||||
%prep
|
||||
%setup -q -n Data-Section-Simple-%{version}
|
||||
|
||||
# Hack for old Test::More versions
|
||||
%if %{old_test_more}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Note that the Makefile.PL complains about missing Test::Requires
|
||||
# but the package doesn't actually use it (CPAN RT#69981)
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
|
||||
%{_fixperms} %{buildroot}
|
||||
|
||||
%check
|
||||
make test
|
||||
make test TEST_FILES="xt/*.t"
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc Changes README
|
||||
%{perl_vendorlib}/Data/
|
||||
%{_mandir}/man3/Data::Section::Simple.3pm*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 4 2011 Paul Howarth <paul@city-fan.org> - 0.02-2
|
||||
- Sanitize for Fedora submission
|
||||
|
||||
* Wed Aug 3 2011 Paul Howarth <paul@city-fan.org> - 0.02-1
|
||||
- Initial RPM version
|
Loading…
Reference in new issue