Files
perl-Data-Validate-Type/perl-Data-Validate-Type.spec

100 lines
3.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-Data-Validate-Type
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#
Name: perl-Data-Validate-Type
Version: 1.4.2
Release: 0
%define cpan_name Data-Validate-Type
Summary: Data type validation functions.
License: OSI-Approved
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Data-Validate-Type/
Source: http://www.cpan.org/authors/id/A/AU/AUBERTG/%{cpan_name}-%{version}.tar.gz
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
#BuildRequires: perl(Data::Validate::Type)
#BuildRequires: perl(LocalTest)
#BuildRequires: perl(LocalTestParent)
#BuildRequires: perl(Test::CPAN::Changes)
#BuildRequires: perl(Test::EOL)
#BuildRequires: perl(Test::Kwalitee::Extra)
#BuildRequires: perl(Test::Perl::Critic)
Requires: perl(Data::Dump)
%{perl_requires}
%description
the Params::Util manpage is a wonderful module, but suffers from a few
drawbacks:
* * 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
issues for the Devel::Cover manpage in taint mode.
Those drawbacks are purely cosmetic and don't affect the usefulness of the
functions, except for the last one. This module used to encapsulate the
Params::Util manpage, but I had to refactor it out to fix the issues with
the Devel::Cover manpage.
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
%setup -q -n %{cpan_name}-%{version}
%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)
%doc Changes examples ignore.txt LICENSE README
%changelog