perl-Hash-Merge-Simple/perl-Hash-Merge-Simple.spec

62 lines
1.8 KiB
RPMSpec
Raw Normal View History

2024-02-20 16:37:05 +08:00
Name: perl-Hash-Merge-Simple
Version: 0.051
Release: 1
License: GPL-1.0-or-later OR Artistic-1.0-Perl
Summary: Recursively merge two or more hashes, simply
URL: https://metacpan.org/release/Hash-Merge-Simple
Source: https://cpan.metacpan.org/modules/by-module/Hash/Hash-Merge-Simple-%{version}.tar.gz
BuildArch: noarch
# Build
BuildRequires: coreutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Runtime
BuildRequires: perl(Clone)
BuildRequires: perl(Exporter)
BuildRequires: perl(Storable)
BuildRequires: perl(vars)
# Tests only
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Most)
# Dependencies
Requires: perl(Clone)
Requires: perl(Exporter)
%description
Hash::Merge::Simple will recursively merge two or more hashes and return
the result as a new hash reference. The merge function will descend and
merge hashes that exist under the same node in both the left and right
hash, but doesn't attempt to combine arrays, objects, scalars, or
anything else. The rightmost hash also takes precedence, replacing
whatever was in the left hash if a conflict occurs. This code was pretty
much taken straight from Catalyst::Utils, and modified to handle more
than 2 hashes at the same time.
%prep
%setup -q -n Hash-Merge-Simple-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
%{make_install}
%{_fixperms} -c %{buildroot}
%check
make test
%files
%doc Changes README
%{perl_vendorlib}/Hash/
%{_mandir}/man3/Hash::Merge::Simple.3*
%changelog
* Tue Feb 20 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 0.051-1
- Initial package