2017-05-29 19:17:46 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Class-AccessorMaker
|
|
|
|
#
|
2024-07-14 17:16:36 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-05-29 19:17: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.
|
|
|
|
|
2024-07-14 17:16:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-29 19:17:46 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-07-14 17:16:36 +00:00
|
|
|
%define cpan_name Class-AccessorMaker
|
2017-05-29 19:17:46 +00:00
|
|
|
Name: perl-Class-AccessorMaker
|
2024-07-14 17:16:36 +00:00
|
|
|
Version: 1.100.0
|
2017-05-29 19:17:46 +00:00
|
|
|
Release: 0
|
2024-07-14 17:16:36 +00:00
|
|
|
# 1.1 -> normalize -> 1.100.0
|
|
|
|
%define cpan_version 1.1
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
|
|
Summary: An accessor method maker
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SI/SINISTER/%{cpan_name}-%{cpan_version}.tar.gz
|
2025-08-12 18:12:20 +02:00
|
|
|
Source100: README.md
|
2017-05-29 19:17:46 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2024-07-14 17:16:36 +00:00
|
|
|
Provides: perl(Class::AccessorMaker) = 1.110.0
|
|
|
|
Provides: perl(Class::AccessorMaker::Private) = 1.0.0
|
|
|
|
%undefine __perllib_provides
|
2017-05-29 19:17:46 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
The AccesorMaker takes in, at use-time, a hash-reference and an extra
|
|
|
|
keyword. It uses the keys of the hash-reference to create accessor-methods
|
|
|
|
in the name-space of the caller. The values that are given to the keys are
|
|
|
|
the default value of the accessor.
|
|
|
|
|
|
|
|
Class::AccessorMaker will create a constructor (called 'new()') by default.
|
|
|
|
This constructor will be able to take that nice and shiny hash-like
|
|
|
|
structure as you can see in the first example.
|
|
|
|
|
|
|
|
If you want your constructor to run your objects 'init()' routine you can
|
|
|
|
specify the keyword "new_init". If you want to write your own 'new()'
|
|
|
|
routine you can use "no_new". Note that Class::AccessorMaker expects your
|
|
|
|
object to be a hash-reference.
|
|
|
|
|
|
|
|
%prep
|
2024-07-14 17:16:36 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
2017-05-29 19:17:46 +00:00
|
|
|
|
|
|
|
%build
|
2024-07-14 17:16:36 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2017-05-29 19:17:46 +00:00
|
|
|
|
|
|
|
%check
|
2024-07-14 17:16:36 +00:00
|
|
|
make test
|
2017-05-29 19:17:46 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes README Todo
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|