File perl-Syntax-Construct.spec of Package perl-Syntax-Construct
#
# spec file for package perl-Syntax-Construct
#
# Copyright (c) 2025 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 Syntax-Construct
Name: perl-Syntax-Construct
Version: 1.043
Release: 0
License: Artistic-2.0
Summary: Explicitly state which non-feature constructs are used in the code
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHOROBA/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
This module provides a simple way of specifying syntactic constructs that
are not implemented via the feature pragma, but are still not compatible
with older versions of Perl.
It's the programmer's responsibility to track the constructs and list them
(but see Perl::MinimumVersion on how to extract the information from
existing code).
Using 'use Syntax::Construct qw( // );' doesn't really change anything if
you're running Perl 5.010+, but it gives much better error messages in
older versions:
Unsupported construct //
instead of
Search pattern not terminated
Three groups of people can benefit from the module:
* 1.
The authors of the module using Syntax::Construct win, as they have all the
constructs in one place (i.e. Syntax::Construct's documentation) and they
don't waste their time searching through perldeltas and other places.
* 2.
Users of their modules win as they get meaningful error messages telling
them which Perl version they need to upgrade to.
* 3.
The programmer they hired to work around the problem wins as they know what
constructs to replace in the code to make it run in the ancient version.
%prep
%autosetup -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes
%changelog