2010-02-18 15:52:00 +00:00
|
|
|
#
|
2012-03-06 08:06:44 +00:00
|
|
|
# spec file for package perl-Params-Util
|
2010-04-04 18:11:13 +00:00
|
|
|
#
|
2020-10-22 08:28:34 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2010-02-18 15:52:00 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-10-22 08:28:34 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-04-04 18:11:13 +00:00
|
|
|
#
|
|
|
|
|
2012-03-06 08:06:44 +00:00
|
|
|
|
2010-02-18 15:52:00 +00:00
|
|
|
Name: perl-Params-Util
|
2020-11-04 10:13:37 +00:00
|
|
|
Version: 1.102
|
2012-03-06 08:06:44 +00:00
|
|
|
Release: 0
|
2020-10-22 08:28:34 +00:00
|
|
|
%define cpan_name Params-Util
|
2011-04-01 05:37:22 +00:00
|
|
|
Summary: Simple, compact and correct param-checking functions
|
2020-10-22 08:28:34 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2010-02-18 15:52:00 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2020-10-22 08:28:34 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/R/RE/REHSACK/%{cpan_name}-%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
2010-02-18 15:52:00 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2020-10-22 08:28:34 +00:00
|
|
|
BuildRequires: perl(IPC::Cmd)
|
|
|
|
BuildRequires: perl(Test::LeakTrace)
|
|
|
|
BuildRequires: perl(Test::More) >= 0.96
|
|
|
|
BuildRequires: perl(XSLoader) >= 0.22
|
|
|
|
BuildRequires: perl(parent)
|
|
|
|
Requires: perl(XSLoader) >= 0.22
|
2011-04-01 05:37:22 +00:00
|
|
|
%{perl_requires}
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%description
|
2011-04-01 05:37:22 +00:00
|
|
|
'Params::Util' provides a basic set of importable functions that makes
|
|
|
|
checking parameters a hell of a lot easier
|
2010-04-04 18:11:13 +00:00
|
|
|
|
2011-04-01 05:37:22 +00:00
|
|
|
While they can be (and are) used in other contexts, the main point behind
|
|
|
|
this module is that the functions *both* Do What You Mean, and Do The Right
|
|
|
|
Thing, so they are most useful when you are getting params passed into your
|
|
|
|
code from someone and/or somewhere else and you can't really trust the
|
|
|
|
quality.
|
|
|
|
|
|
|
|
Thus, 'Params::Util' is of most use at the edges of your API, where params
|
|
|
|
and data are coming in from outside your code.
|
2010-04-04 18:11:13 +00:00
|
|
|
|
2011-04-01 05:37:22 +00:00
|
|
|
The functions provided by 'Params::Util' check in the most strictly correct
|
|
|
|
manner known, are documented as thoroughly as possible so their exact
|
|
|
|
behaviour is clear, and heavily tested so make sure they are not fooled by
|
|
|
|
weird data and Really Bad Things.
|
|
|
|
|
|
|
|
To use, simply load the module providing the functions you want to use as
|
|
|
|
arguments (as shown in the SYNOPSIS).
|
2010-03-05 08:57:29 +00:00
|
|
|
|
2011-04-01 05:37:22 +00:00
|
|
|
To aid in maintainability, 'Params::Util' will *never* export by default.
|
2010-03-05 08:57:29 +00:00
|
|
|
|
2011-04-01 05:37:22 +00:00
|
|
|
You must explicitly name the functions you want to export, or use the
|
|
|
|
':ALL' param to just have it export everything (although this is not
|
|
|
|
recommended if you have any _FOO functions yourself with which future
|
|
|
|
additions to 'Params::Util' may clash)
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2020-10-22 08:28:34 +00:00
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%build
|
2020-10-22 08:28:34 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
|
|
make %{?_smp_mflags}
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%check
|
2020-10-22 08:28:34 +00:00
|
|
|
make test
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2011-04-30 15:19:50 +00:00
|
|
|
%defattr(-,root,root,755)
|
2020-10-22 08:28:34 +00:00
|
|
|
%doc Changes README.md
|
2020-10-23 19:29:52 +00:00
|
|
|
%license ARTISTIC-1.0 GPL-1 LICENSE
|
2010-02-18 15:52:00 +00:00
|
|
|
|
|
|
|
%changelog
|