2013-09-28 11:20:46 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Data-Validate-Type
|
|
|
|
#
|
2017-03-23 06:51:05 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-09-28 11:20:46 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: perl-Data-Validate-Type
|
2017-03-23 06:51:05 +00:00
|
|
|
Version: 1.6.0
|
2013-09-28 11:20:46 +00:00
|
|
|
Release: 0
|
|
|
|
%define cpan_name Data-Validate-Type
|
2017-03-23 06:51:05 +00:00
|
|
|
Summary: Data type validation functions
|
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2013-09-28 11:20:46 +00:00
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
Url: http://search.cpan.org/dist/Data-Validate-Type/
|
2017-03-23 06:51:05 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/A/AU/AUBERTG/%{cpan_name}-v%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:13:10 +02:00
|
|
|
Source100: README.md
|
2013-09-28 11:20:46 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: perl(Data::Dump)
|
|
|
|
BuildRequires: perl(Module::Build)
|
|
|
|
BuildRequires: perl(Test::Exception)
|
|
|
|
BuildRequires: perl(Test::FailWarnings)
|
|
|
|
BuildRequires: perl(Test::More) >= 0.94
|
|
|
|
Requires: perl(Data::Dump)
|
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2017-03-23 06:51:05 +00:00
|
|
|
Params::Util is a wonderful module, but suffers from a few drawbacks:
|
2013-09-28 11:20:46 +00:00
|
|
|
|
|
|
|
* * Function names start with an underscore, which is usually used to
|
|
|
|
indicate private functions.
|
|
|
|
|
|
|
|
* * Function names are uppercase, which is usually used to indicate file
|
|
|
|
handles or constants.
|
|
|
|
|
|
|
|
* * Function names don't pass PerlCritic's validation, making them
|
|
|
|
problematic to import.
|
|
|
|
|
|
|
|
* * Functions use by default the convention that collection that
|
|
|
|
collections
|
|
|
|
need to not be empty to be valid (see _ARRAY0/_ARRAY for example), which
|
|
|
|
is
|
|
|
|
counter-intuitive.
|
|
|
|
|
|
|
|
* * In Pure Perl mode, the functions are created via eval, which causes
|
2017-03-23 06:51:05 +00:00
|
|
|
issues for Devel::Cover in taint mode.
|
2013-09-28 11:20:46 +00:00
|
|
|
|
|
|
|
Those drawbacks are purely cosmetic and don't affect the usefulness of the
|
2017-03-23 06:51:05 +00:00
|
|
|
functions, except for the last one. This module used to encapsulate
|
|
|
|
Params::Util, but I had to refactor it out to fix the issues with
|
|
|
|
Devel::Cover.
|
2013-09-28 11:20:46 +00:00
|
|
|
|
|
|
|
Please note that I prefer long function names that are descriptive, to
|
|
|
|
arcane short ones. This increases readability, and the bulk of the typing
|
|
|
|
can be spared with the use of a good IDE like Padre.
|
|
|
|
|
|
|
|
Also, this is work in progress - There is more functions that should be
|
|
|
|
added here, if you need one in particular feel free to contact me.
|
|
|
|
|
|
|
|
%prep
|
2015-04-14 08:05:57 +00:00
|
|
|
%setup -q -n %{cpan_name}-v%{version}
|
2013-09-28 11:20:46 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%{__perl} Build.PL installdirs=vendor
|
|
|
|
./Build build flags=%{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
./Build test
|
|
|
|
|
|
|
|
%install
|
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
2017-03-23 06:51:05 +00:00
|
|
|
%doc Changes examples ignore.txt README.md
|
|
|
|
%license LICENSE
|
2013-09-28 11:20:46 +00:00
|
|
|
|
|
|
|
%changelog
|