Files
perl-Set-Array/perl-Set-Array.spec
2025-08-12 18:17:03 +02:00

74 lines
2.5 KiB
RPMSpec

#
# spec file for package perl-Set-Array
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define cpan_name Set-Array
Name: perl-Set-Array
Version: 0.300.0
Release: 0
# 0.30 -> normalize -> 0.300.0
%define cpan_version 0.30
License: Artistic-2.0
Summary: Arrays as objects with lots of handy methods
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/%{cpan_name}-%{cpan_version}.tgz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Build) >= 0.38
BuildRequires: perl(Test::Deep) >= 0.108
BuildRequires: perl(Try::Tiny) >= 0.11
BuildRequires: perl(Want)
Requires: perl(Try::Tiny) >= 0.11
Requires: perl(Want)
Provides: perl(Set::Array) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Set::Array allows you to create arrays as objects and use OO-style methods
on them. Many convenient methods are provided here that appear in the FAQs,
the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are
Set methods with corresponding (overloaded) operators for the purpose of
Set comparison, i.e. *+*, *==*, etc.
The purpose is to provide built-in methods for operations that people are
always asking how to do, and which already exist in languages like Ruby.
This should (hopefully) improve code readability and/or maintainability.
The other advantage to this module is method-chaining by which any number
of methods may be called on a single object in a single statement.
%prep
%autosetup -n %{cpan_name}-%{cpan_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
%doc Changes README
%changelog