2011-04-14 07:42:26 +00:00
|
|
|
#
|
2011-04-14 07:42:41 +00:00
|
|
|
# spec file for package perl-autobox
|
2011-04-14 07:42:26 +00:00
|
|
|
#
|
2024-12-31 00:22:22 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2011-04-14 07:42:26 +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.
|
|
|
|
|
2024-12-31 00:22:22 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-04-14 07:42:26 +00:00
|
|
|
#
|
|
|
|
|
2011-04-14 07:42:41 +00:00
|
|
|
|
2024-12-31 00:22:22 +00:00
|
|
|
%define cpan_name autobox
|
2011-04-14 07:42:26 +00:00
|
|
|
Name: perl-autobox
|
2024-12-31 00:22:22 +00:00
|
|
|
Version: 3.0.2
|
2013-06-15 07:03:08 +00:00
|
|
|
Release: 0
|
2024-12-31 00:22:22 +00:00
|
|
|
# v3.0.2 -> normalize -> 3.0.2
|
|
|
|
%define cpan_version v3.0.2
|
2018-04-23 07:47:59 +00:00
|
|
|
License: Artistic-2.0
|
2024-12-31 00:22:22 +00:00
|
|
|
Summary: Call methods on native types
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHOCOLATE/%{cpan_name}-%{cpan_version}.tar.gz
|
2015-04-15 19:58:28 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:11:54 +02:00
|
|
|
Source100: README.md
|
2011-04-14 07:42:26 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2024-12-31 00:22:22 +00:00
|
|
|
BuildRequires: perl(IPC::System::Simple) >= 1.30
|
2016-09-01 12:08:04 +00:00
|
|
|
BuildRequires: perl(Scope::Guard) >= 0.21
|
2024-12-31 00:22:22 +00:00
|
|
|
BuildRequires: perl(Test::Fatal) >= 0.017
|
2018-05-18 18:20:09 +00:00
|
|
|
BuildRequires: perl(version) >= 0.77
|
2016-09-01 12:08:04 +00:00
|
|
|
Requires: perl(Scope::Guard) >= 0.21
|
2018-05-18 18:20:09 +00:00
|
|
|
Requires: perl(version) >= 0.77
|
2011-04-14 07:42:26 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2018-05-18 18:20:09 +00:00
|
|
|
The autobox pragma allows methods to be called on integers, floats,
|
2011-04-14 07:42:26 +00:00
|
|
|
strings, arrays, hashes, and code references in exactly the same manner as
|
|
|
|
blessed references.
|
|
|
|
|
2016-09-01 12:08:04 +00:00
|
|
|
Autoboxing is transparent: values are not blessed into their (user-defined)
|
|
|
|
implementation class (unless the method elects to bestow such a blessing) -
|
|
|
|
they simply use its methods as though they are.
|
2011-04-14 07:42:26 +00:00
|
|
|
|
2013-11-26 08:55:51 +00:00
|
|
|
The classes (packages) into which the native types are boxed are fully
|
|
|
|
configurable. By default, a method invoked on a non-object value is assumed
|
|
|
|
to be defined in a class whose name corresponds to the 'ref()' type of that
|
|
|
|
value - or SCALAR if the value is a non-reference.
|
|
|
|
|
2011-04-14 07:42:26 +00:00
|
|
|
%prep
|
2024-12-31 00:22:22 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2011-04-14 07:42:26 +00:00
|
|
|
|
|
|
|
%build
|
2024-12-31 00:22:22 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
|
|
%make_build
|
2011-04-14 07:42:26 +00:00
|
|
|
|
|
|
|
%check
|
2024-12-31 00:22:22 +00:00
|
|
|
make test
|
2011-04-14 07:42:26 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2013-06-15 07:03:08 +00:00
|
|
|
%doc Changes README
|
2018-04-23 07:47:59 +00:00
|
|
|
%license LICENSE.md
|
2011-04-14 07:42:26 +00:00
|
|
|
|
|
|
|
%changelog
|