# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-Error Epoch: 1 Version: 0.17030 Release: 1.%{__distinit}%{__distvers} Summary: Error/exception handling in an OO-ish way License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND X11 URL: https://metacpan.org/release/Error Source0: https://cpan.metacpan.org/modules/by-module/Error/Error-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(overload) BuildRequires: perl(Scalar::Util) BuildRequires: perl(strict) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(base) BuildRequires: perl(blib) BuildRequires: perl(File::Spec) BuildRequires: perl(IO::Handle) BuildRequires: perl(IPC::Open3) BuildRequires: perl(lib) BuildRequires: perl(Test::More) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Carp) # Avoid provides/requires from examples %global __provides_exclude_from ^%{_docdir} %global __requires_exclude_from ^%{_docdir} %description The Error package provides two interfaces. Firstly Error provides a procedural interface to exception handling. Secondly Error is a base class for errors/exceptions that can either be thrown, for subsequent catch, or can simply be recorded. %prep %setup -q -n Error-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %license LICENSE # GPL-1.0-or-later OR Artistic-1.0-Perl %doc ChangeLog Changes README examples/ %{perl_vendorlib}/Error.pm %{_mandir}/man3/Error.3* # X11 %{perl_vendorlib}/Error/ %{_mandir}/man3/Error::Simple.3* %changelog * Tue Feb 18 2025 Paul Howarth - 1:0.17030-1 - Update to 0.17030 (rhbz#2346218) - Fix die/warn hooks for perl 5.41.9 changes (GH#4) * Thu Apr 6 2023 Paul Howarth - 1:0.17029-12 - Use SPDX-format license tag - Use %%license unconditionally * Tue Mar 10 2020 Paul Howarth - 1:0.17029-2 - BR: perl(blib) for t/00-compile.t * Tue Jan 28 2020 Paul Howarth - 1:0.17029-1 - Update to 0.17029 - Rebuild for order of 'NAME' and 'VERSION' sections in the generated POD documentation (VERSION used to appear before NAME) * Mon Aug 26 2019 Paul Howarth - 1:0.17028-1 - Update to 0.17028 - Moved the VCS repo to https://github.com/shlomif/perl-error.pm * Thu Jun 6 2019 Paul Howarth - 1:0.17027-3 - Perl 5.30 rebuild * Sun Oct 28 2018 Paul Howarth - 1:0.17027-1 - Update to 0.17027 - Documentation and examples enhancements (PR#1) * Thu May 24 2018 Paul Howarth - 1:0.17026-1 - Update to 0.17026 - Convert to Dist-Zilla - Switch to ExtUtils::MakeMaker flow - Switch upstream from search.cpan.org to metacpan.org * Tue Aug 8 2017 Paul Howarth - 1:0.17025-1 - Update to 0.17025 - Fix 'use Error::Simple' overriding the $VERSION (CPAN RT#122713) - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Sun Aug 21 2016 Paul Howarth - 1:0.17024-7 - BR: perl-generators where available * Sat Jun 20 2015 Paul Howarth - 1:0.17024-4 - Perl 5.22 rebuild * Sun May 31 2015 Paul Howarth - 1:0.17024-1 - Update to 0.17024 - Add link to the VCS repository in META.yml * Thu Feb 12 2015 Paul Howarth - 1:0.17023-1 - Update to 0.17023 - Minimal version of Module-Build reduced to 0.280801 (CPAN RT#102062) * Sun Aug 31 2014 Paul Howarth - 1:0.17022-3 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Wed Jan 29 2014 Paul Howarth - 1:0.17022-1 - Update to 0.17022 - Add "use warnings;" to everything - Add a separate LICENSE file * Thu Oct 3 2013 Paul Howarth - 1:0.17021-2 - Classify buildreqs by usage * Sun Sep 1 2013 Paul Howarth - 1:0.17021-1 - Update to 0.17021 - Fix for the format of the new Carp in bleadperl (CPAN RT#88137) * Sun Jul 21 2013 Paul Howarth - 1:0.17020-2 - Perl 5.18 rebuild * Fri May 3 2013 Paul Howarth - 1:0.17020-1 - Update to 0.17020 - Correct typos (CPAN RT#85023) - Avoid provides/requires from examples * Mon Nov 19 2012 Paul Howarth - 1:0.17019-1 - Update to 0.17019 - Change to Shlomi Fish's new E-mail and web address - Clarify the licence of lib/Error/Simple.pm (CPAN RT#81277) - Update License tag as per upstream * Thu Jun 28 2012 Paul Howarth - 1:0.17018-2 - BR: perl(base), perl(File::Spec) and perl(lib) - BR:/R: perl(Carp) * Tue May 8 2012 Paul Howarth - 1:0.17018-1 - Update to 0.17018 - Add a $VERSION variable for Error::Simple - Add scripts/bump-version-number.pl, which can be used to bump the version numbers globally - Don't need to remove empty directories from buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Don't need to run test suite with LC_ALL=C - Drop Perl core buildreqs that aren't actually dual-lived * Sat Feb 11 2012 Paul Howarth - 1:0.17017-1 - Update to 0.17017 - Bleadperl broke Error.pm's tests (CPAN RT#74770) - Check for optional trailing periods - Add buildreqs for core perl modules that might be dual-lived * Fri Jun 24 2011 Paul Howarth - 1:0.17016-4 - Rebuild for perl 5.14.1 in Rawhide - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Fri Jun 25 2010 Paul Howarth - 1:0.17016-3 - Rebuild for perl 5.12.1 in Rawhide * Tue Jun 8 2010 Paul Howarth - 1:0.17016-2 - Fix dist tag for RHEL-6 Beta * Mon Dec 21 2009 Paul Howarth - 1:0.17016-1 - Update to 0.17016 - CPAN RT#46364 - document incompatibility of "use Error qw(:try)" with Moose - Add TryCatch and Try::Tiny to the "SEE ALSO" - Add the WARNING that this module is no longer recommended - Dist tag for Rawhide no longer needs special-casing * Wed Sep 9 2009 Paul Howarth - 1:0.17015-3 - Define RPM macros in global scope * Thu Oct 16 2008 Paul Howarth - 1:0.17015-2 - Import from Fedora * Sat Aug 02 2008 Steven Pritchard - 1:0.17015-1 - Update to 0.17015 * Sat May 31 2008 Steven Pritchard - 1:0.17014-1 - Update to 0.17014 * Tue Feb 5 2008 Tom "spot" Callaway - 1:0.17012-2 - Rebuild for new perl * Mon Jan 28 2008 Steven Pritchard - 1:0.17012-1 - Update to 0.17012 * Mon Jan 07 2008 Steven Pritchard - 1:0.17011-1 - Update to 0.17011 - Canonicalize Source0 URL - Fix find option order - Use fixperms macro instead of our own chmod incantation - Improve Summary - Reformat to match cpanspec output - Build with Module::Build * Tue Dec 04 2007 Ralf Corsépius - 1:0.17010-1 - Upstream update - Update license tag * Sat Oct 28 2006 Jose Pedro Oliveira - 1:0.17008-1 - Update to 0.17008 * Wed Oct 18 2006 Jose Pedro Oliveira - 1:0.17007-1 - Update to 0.17007 * Sat Oct 7 2006 Jose Pedro Oliveira - 1:0.17006-1 - Update to 0.17006 - New build requirements: Test::Pod and Test::Pod::Coverage * Wed Oct 4 2006 Jose Pedro Oliveira - 1:0.17005-1 - Update to 0.17005 * Mon Sep 4 2006 Jose Pedro Oliveira - 1:0.17004-1 - Update to 0.17004 * Mon Aug 28 2006 Jose Pedro Oliveira - 1:0.17003-1 - Update to 0.17003 * Wed Aug 9 2006 Jose Pedro Oliveira - 1:0.17001-1 - Update to 0.17001 * Fri Jul 14 2006 Jose Pedro Oliveira - 1:0.17-1 - Update to 0.17 * Tue Jul 11 2006 Jose Pedro Oliveira - 1:0.16-1 - Update to 0.16 * Fri Apr 28 2006 Jose Pedro Oliveira - 0.15009-1 - Update to 0.15009 * Wed Apr 19 2006 Jose Pedro Oliveira - 0.15008-1 - Update to 0.15008 * Fri Feb 17 2006 Jose Pedro Oliveira - 0.15-4 - Rebuild for FC5 (perl 5.8.8) * Thu Dec 29 2005 Jose Pedro Oliveira - 0.15-3 - Dist tag * Wed Apr 6 2005 Michael Schwendt - 0.15-2 - Rebuilt * Fri Jun 11 2004 Steven Pritchard - 0.15-1 - Specfile autogenerated