# # spec file for package perl-Perl6-Export-Attrs # # 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 Perl6-Export-Attrs Name: perl-Perl6-Export-Attrs Version: 0.0.6 Release: 0 %define cpan_version 0.000006 License: Artistic-1.0 OR GPL-1.0-or-later Summary: The Perl 6 'is export(...)' trait as a Perl 5 attribute URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DC/DCONWAY/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Module::Build) BuildRequires: perl(PadWalker) BuildRequires: perl(version) Requires: perl(PadWalker) Requires: perl(version) Provides: perl(Perl6::Export::Attrs) = %{version} %undefine __perllib_provides %{perl_requires} %description Implements a Perl 5 native version of what the Perl 6 symbol export mechanism will look like (with some unavoidable restrictions). It's very straightforward: * If you want a subroutine or package variable to be capable of being exported (when explicitly requested in the 'use' arguments), you mark it with the ':Export' attribute. * If you want a subroutine or package variable to be automatically exported when the module is used (without specific overriding arguments), you mark it with the ':Export(:DEFAULT)' attribute. * If you want a subroutine or package variable to be automatically exported when the module is used (even if the user specifies overriding arguments), you mark it with the ':Export(:MANDATORY)' attribute. * If the subroutine or package variable should also be exported when particular export groups are requested, you add the names of those export groups to the attribute's argument list. That's it. %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