Accepting request 111081 from devel:languages:perl
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/111081 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Data-OptList?expand=0&rev=11
This commit is contained in:
commit
3ddfc0204e
@ -1,28 +0,0 @@
|
|||||||
--- Makefile.PL
|
|
||||||
+++ Makefile.PL
|
|
||||||
@@ -12,7 +12,7 @@
|
|
||||||
'ABSTRACT' => 'parse and validate simple name/value option pairs',
|
|
||||||
'AUTHOR' => 'Ricardo Signes <rjbs@cpan.org>',
|
|
||||||
'BUILD_REQUIRES' => {
|
|
||||||
- 'Test::More' => '0.96'
|
|
||||||
+ 'Test::More' => '0.01'
|
|
||||||
},
|
|
||||||
'CONFIGURE_REQUIRES' => {
|
|
||||||
'ExtUtils::MakeMaker' => '6.30'
|
|
||||||
--- t/mkopt.t
|
|
||||||
+++ t/mkopt.t
|
|
||||||
@@ -10,7 +10,7 @@
|
|
||||||
|
|
||||||
use Data::OptList;
|
|
||||||
use Sub::Install;
|
|
||||||
-use Test::More 0.88;
|
|
||||||
+use Test::More qw(no_plan);
|
|
||||||
|
|
||||||
|
|
||||||
# let's get a convenient copy to use:
|
|
||||||
@@ -180,4 +180,4 @@
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
-done_testing;
|
|
||||||
+#done_testing;
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 16 09:25:31 UTC 2012 - lars@linux-schulserver.de
|
||||||
|
|
||||||
|
- remove old_test_more.patch and use sed statement
|
||||||
|
instead (less likely to break with every package update)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 29 17:09:20 CET 2012 - ro@suse.de
|
Wed Feb 29 17:09:20 CET 2012 - ro@suse.de
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: perl-Data-OptList
|
Name: perl-Data-OptList
|
||||||
%define cpan_name Data-OptList
|
%define cpan_name Data-OptList
|
||||||
Summary: Parse and validate simple name/value option pairs
|
Summary: Parse and validate simple name/value option pairs
|
||||||
License: Artistic-1.0
|
License: Artistic-1.0
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
@ -25,15 +25,13 @@ Version: 0.107
|
|||||||
Release: 0
|
Release: 0
|
||||||
Url: http://search.cpan.org/dist/Data-OptList
|
Url: http://search.cpan.org/dist/Data-OptList
|
||||||
Source: http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz
|
Source: http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz
|
||||||
%if 0%{?suse_version} < 1120
|
|
||||||
Patch0: old_test_more.patch
|
|
||||||
%endif
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(List::Util) >= 0.00
|
BuildRequires: perl(List::Util) >= 0.00
|
||||||
|
BuildRequires: perl(Test::More) >= 0.88
|
||||||
# other not perl || perl-base
|
# other not perl || perl-base
|
||||||
BuildRequires: perl(Params::Util) >= 0.14
|
BuildRequires: perl(Params::Util) >= 0.14
|
||||||
BuildRequires: perl(Sub::Install) >= 0.921
|
BuildRequires: perl(Sub::Install) >= 0.921
|
||||||
@ -44,44 +42,43 @@ Requires: perl(Params::Util) >= 0.14
|
|||||||
Requires: perl(Sub::Install) >= 0.921
|
Requires: perl(Sub::Install) >= 0.921
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Hashes are great for storing named data, but if you want more than one
|
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
|
entry for a name, you have to use a list of pairs. Even then, this is
|
||||||
really boring to write:
|
really boring to write:
|
||||||
|
|
||||||
$values = [
|
$values = [
|
||||||
foo => undef,
|
foo => undef,
|
||||||
bar => undef,
|
bar => undef,
|
||||||
baz => undef,
|
baz => undef,
|
||||||
xyz => { ... },
|
xyz => { ... },
|
||||||
];
|
];
|
||||||
|
|
||||||
Just look at all those undefs! Don't worry, we can get rid of those:
|
Just look at all those undefs! Don't worry, we can get rid of those:
|
||||||
|
|
||||||
$values = [
|
$values = [
|
||||||
map { $_ => undef } qw(foo bar baz),
|
map { $_ => undef } qw(foo bar baz),
|
||||||
xyz => { ... },
|
xyz => { ... },
|
||||||
];
|
];
|
||||||
|
|
||||||
Aaaauuugh! We've saved a little typing, but now it requires thought to
|
Aaaauuugh! We've saved a little typing, but now it requires thought to
|
||||||
read, and thinking is even worse than typing.
|
read, and thinking is even worse than typing.
|
||||||
|
|
||||||
With Data::OptList, you can do this instead:
|
With Data::OptList, you can do this instead:
|
||||||
|
|
||||||
$values = Data::OptList::mkopt([
|
$values = Data::OptList::mkopt([
|
||||||
qw(foo bar baz),
|
qw(foo bar baz),
|
||||||
xyz => { ... },
|
xyz => { ... },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
This works by assuming that any defined scalar is a name and any
|
|
||||||
reference following a name is its value.
|
|
||||||
|
|
||||||
Author: Ricardo SIGNES, <rjbs@cpan.org>
|
|
||||||
|
|
||||||
|
This works by assuming that any defined scalar is a name and any
|
||||||
|
reference following a name is its value.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
%if 0%{?suse_version} < 1120
|
%if 0%{?suse_version} < 1120
|
||||||
%patch0
|
for i in `find t -type f` ; do
|
||||||
|
sed -i -e "s@^\s*use\s\s*Test::More@use lib '%{perl_vendorlib}';\nuse Test::More@" $i
|
||||||
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -104,7 +101,6 @@ Requires: perl(Sub::Install) >= 0.921
|
|||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
%{__rm} -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
# normally you only need to check for doc files
|
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc Changes LICENSE README
|
%doc Changes LICENSE README
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user