Files
perl-Function-Parameters/perl-Function-Parameters.spec
Stephan Kulow 2f754ce1b7 - updated to 2.001003
see /usr/share/doc/packages/perl-Function-Parameters/Changes
  2.001003  2017-11-11
            - Fix threaded initialization issue better. This is the same issue
              that was fixed in 2.001002, but now we use PL_op_mutex instead of
              PL_check_mutex. This has the advantage of also being thread-safe on
              v5.14.
  
  2.001002  2017-11-09
            - Fix crash when Function::Parameters is loaded at runtime by
              multiple threads (a stack overflow due to infinite recursion).
              This is arguably a core bug (#132413). The current workaround
              employed by Function::Parameters slightly abuses an internal perl
              mutex meant for something else (protecting op checkers), but it
              fixes the issue on perls v5.16 .. v5.26.
              v5.14 doesn't have this API yet, so the workaround is not thread
              safe there. It is technically possible to still run into this issue
              if two threads initialize Function::Parameters at the exact same
              moment (I haven't managed to reproduce this yet, so hopefully it's
              unlikely in practice).
              It is possible to completely avoid the problem on all versions of
              perl and Function::Parameters by making sure the module is loaded
              before the first thread is created.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Function-Parameters?expand=0&rev=15
2017-12-10 14:06:03 +00:00

69 lines
2.4 KiB
RPMSpec

#
# spec file for package perl-Function-Parameters
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: perl-Function-Parameters
Version: 2.001003
Release: 0
%define cpan_name Function-Parameters
Summary: Define Functions and Methods with Parameter Lists ("Subroutine Signatures")
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Function-Parameters/
Source0: https://cpan.metacpan.org/authors/id/M/MA/MAUKE/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Dir::Self)
BuildRequires: perl(Hash::Util) >= 0.07
BuildRequires: perl(Test::Fatal)
%{perl_requires}
%description
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, it offers far more features than core
signatures, and it is not experimental. 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.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes Makefile_PL_settings.plx README
%changelog