File perl-Function-Parameters.spec of Package perl-Function-Parameters

# spec file for package perl-Function-Parameters
# Copyright (c) 2023 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

%define cpan_name Function-Parameters
Name:           perl-Function-Parameters
Version:        2.002004
Release:        0
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Define functions and methods with parameter lists ("subroutine signatures")
URL:  {cpan_name}
Source1:        cpanspec.yml
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::MakeMaker) >= 7.0
BuildRequires:  perl(Hash::Util) >= 0.07
BuildRequires:  perl(Test::Fatal)

This module provides two new keywords, 'fun' and 'method', for defining
functions and methods with parameter lists. At minimum this saves you from
having to unpack '@_' manually, but this module can do much more for you.

The parameter lists provided by this module are similar to the 'signatures'
feature available in perl v5.20+. However, this module supports all perl
versions starting from v5.14 and it offers far more features than core
signatures. The downside is that you need a C compiler if you want to
install it from source, as it uses Perl's keyword plugin API in order to
work reliably without requiring a source filter.

%autosetup  -n %{cpan_name}-%{version}

perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"

make test


%files -f %{name}.files
%doc Changes Makefile_PL_settings.plx README

openSUSE Build Service is sponsored by