File perl-Syntax-Construct.spec of Package perl-Syntax-Construct

#
# spec file for package perl-Syntax-Construct
#
# Copyright (c) 2018 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-Syntax-Construct
Version:        1.007
Release:        0
%define cpan_name Syntax-Construct
Summary:        Identify which non-feature constructs are used in the code
License:        Artistic-2.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Syntax-Construct/
Source0:        https://cpan.metacpan.org/authors/id/C/CH/CHOROBA/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
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.10+, 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 what Perl version they need to upgrade to.

* 3.

The programmer they hired to workaround the problem wins as they know what
constructs to replace in the code to make it run in the ancient version.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__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

%changelog
openSUSE Build Service is sponsored by