#%if ! (0%{?rhel}) # Run extra test #%bcond_without perl_Data_OptList_enables_extra_test # Run optional test #%bcond_without perl_Data_OptList_enables_optional_test #%else #%bcond_with perl_Data_OptList_enables_extra_test #%bcond_with perl_Data_OptList_enables_optional_test #%endif Name: perl-Data-OptList Version: 0.110 Release: 1%{?dist} Summary: Parse and validate simple name/value option pairs License: GPL+ or Artistic Group: Development/Libraries Vendor: bww bitwise works GmbH URL: http://search.cpan.org/dist/Data-OptList/ Source0: http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make #BuildRequires: perl-interpreter BuildRequires: perl-generators BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(List::Util) BuildRequires: perl(Params::Util) BuildRequires: perl(strict) BuildRequires: perl(Sub::Install) >= 0.921 BuildRequires: perl(warnings) # Test Suite #BuildRequires: perl(File::Spec) #BuildRequires: perl(Test::More) >= 0.88 #%if %{with perl_Data_OptList_enables_optional_test} # Optional Tests #BuildRequires: perl(CPAN::Meta) >= 2.120900 #BuildRequires: perl(CPAN::Meta::Prereqs) #%endif #%if %{with perl_Data_OptList_enables_extra_test} # Extra Tests #BuildRequires: perl(Test::Pod) >= 1.41 #%endif # Dependencies Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Hashes are great for storing named data, but if you want more than one entry for a name, you have to use a list of pairs. Even then, this is really boring to write: $values = [ foo => undef, bar => undef, baz => undef, xyz => { ... }, ]; With Data::OptList, you can do this instead: $values = Data::OptList::mkopt([ qw(foo bar baz), xyz => { ... }, ]); This works by assuming that any defined scalar is a name and any reference following a name is its value. %prep %setup -q -n Data-OptList-%{version} # Fix shellbangs in tests #for F in t/*; do # perl -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(q{$F})" #done %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} make manifypods %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} %{buildroot} %check #make test #%if %{with perl_Data_OptList_enables_extra_test} #make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" #%endif %files %license LICENSE %doc Changes README t/ %{perl_vendorlib}/Data/ #%{_mandir}/man3/Data::OptList.3* %{_mandir}/man3/*.3* %changelog * Wed May 16 2018 Elbert Pol - 0.110-1 - initial rpm for OS2