File perl-Data-OptList.spec of Package perl-Data-OptList

# spec file for package perl-Data-OptList (Version 0.106)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# norootforbuild

Name:           perl-Data-OptList
%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
Summary:        Parse and validate simple name/value option pairs
Version:        0.106
Release:        4
License:        Artistic
Group:          Development/Libraries/Perl
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(List::Util) >= 0.00
# other not perl || perl-base
BuildRequires:  perl(Sub::Install) >= 0.921
BuildRequires:  perl(Params::Util) >= 0.14
Requires:       perl(List::Util) >= 0.00
# other not perl || perl-base
Requires:       perl(Sub::Install) >= 0.921
Requires:       perl(Params::Util) >= 0.14

    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 => { ... },

    Just look at all those undefs! Don't worry, we can get rid of those:

      $values = [
        map { $_ => undef } qw(foo bar baz),
        xyz => { ... },

    Aaaauuugh! We've saved a little typing, but now it requires thought to
    read, and thinking is even worse than typing.

    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.

  Author:	Ricardo SIGNES, <>

%setup -q -n %{cpan_name}-%{version}

%{__perl} Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
%{__make} %{?_smp_mflags}

%{__make} test

# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib

%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
# normally you only need to check for doc files

openSUSE Build Service is sponsored by