010dd6
%if ! (0%{?rhel})
010dd6
# Run extra test
010dd6
%bcond_without perl_Test_Fatal_enables_extra_test
010dd6
# Run optional test
010dd6
%bcond_without perl_Test_Fatal_enables_optional_test
010dd6
%else
010dd6
%bcond_with perl_Test_Fatal_enables_extra_test
010dd6
%bcond_with perl_Test_Fatal_enables_optional_test
010dd6
%endif
010dd6
010dd6
Summary:	Incredibly simple helpers for testing code with exceptions 
010dd6
Name:		perl-Test-Fatal
010dd6
Version:	0.016
010dd6
Release:	4%{?dist}
010dd6
License:	GPL+ or Artistic
010dd6
URL:		https://metacpan.org/release/Test-Fatal
010dd6
Source0:	https://cpan.metacpan.org/modules/by-module/Test/Test-Fatal-%{version}.tar.gz
010dd6
BuildArch:	noarch
010dd6
# Module Build
010dd6
BuildRequires:	coreutils
010dd6
BuildRequires:	findutils
010dd6
BuildRequires:	make
010dd6
BuildRequires:	perl-generators
010dd6
BuildRequires:	perl-interpreter
010dd6
BuildRequires:	perl(ExtUtils::MakeMaker)
010dd6
# Module Runtime
010dd6
BuildRequires:	perl(Carp)
010dd6
BuildRequires:	perl(Exporter) >= 5.57
010dd6
BuildRequires:	perl(strict)
010dd6
BuildRequires:	perl(Test::Builder)
010dd6
BuildRequires:	perl(Try::Tiny) >= 0.07
010dd6
BuildRequires:	perl(warnings)
010dd6
# Test Suite
010dd6
BuildRequires:	perl(File::Spec)
010dd6
BuildRequires:	perl(overload)
010dd6
BuildRequires:	perl(Test::Builder::Tester)
010dd6
BuildRequires:	perl(Test::More) >= 0.65
010dd6
%if %{with perl_Test_Fatal_enables_optional_test}
010dd6
# Optional Tests
010dd6
BuildRequires:	perl(CPAN::Meta) >= 2.120900
010dd6
%endif
010dd6
%if %{with perl_Test_Fatal_enables_extra_test}
010dd6
# Extra Tests
010dd6
BuildRequires:	perl(Encode)
010dd6
BuildRequires:	perl(Test::Pod) >= 1.41
010dd6
%endif
010dd6
# Runtime
010dd6
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
010dd6
Requires:	perl(Test::Builder)
010dd6
010dd6
%description
010dd6
Test::Fatal is an alternative to the popular Test::Exception. It does much
010dd6
less, but should allow greater flexibility in testing exception-throwing code
010dd6
with about the same amount of typing.
010dd6
010dd6
%prep
010dd6
%setup -q -n Test-Fatal-%{version}
010dd6
010dd6
# Avoid doc-file dependencies
010dd6
chmod -c -x examples/*
010dd6
010dd6
%build
010dd6
perl Makefile.PL INSTALLDIRS=vendor
010dd6
make %{?_smp_mflags}
010dd6
010dd6
%install
010dd6
make pure_install DESTDIR=%{buildroot}
010dd6
find %{buildroot} -type f -name .packlist -delete
010dd6
%{_fixperms} -c %{buildroot}
010dd6
010dd6
%check
010dd6
make test
010dd6
%if %{with perl_Test_Fatal_enables_extra_test}
010dd6
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
010dd6
%endif
010dd6
010dd6
%files
010dd6
%license LICENSE
010dd6
%doc Changes README examples/
010dd6
%{perl_vendorlib}/Test/
010dd6
%{_mandir}/man3/Test::Fatal.3*
010dd6
010dd6
%changelog
010dd6
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.016-4
010dd6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
010dd6
  Related: rhbz#1991688
010dd6
010dd6
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.016-3
010dd6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
010dd6
010dd6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.016-2
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
010dd6
010dd6
* Mon Aug 10 2020 Paul Howarth <paul@city-fan.org> - 0.016-1
010dd6
- Update to 0.016
010dd6
  - Add default descriptions to tests
010dd6
  - Work on ancient Test::Builder code
010dd6
- Use author-independent source URL
010dd6
- Simplify find command using -delete
010dd6
- Fix permissions verbosely
010dd6
010dd6
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-17
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
010dd6
010dd6
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-16
010dd6
- Perl 5.32 rebuild
010dd6
010dd6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-15
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
010dd6
010dd6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-14
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
010dd6
010dd6
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-13
010dd6
- Perl 5.30 rebuild
010dd6
010dd6
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-12
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
010dd6
010dd6
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-11
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
010dd6
010dd6
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-10
010dd6
- Perl 5.28 rebuild
010dd6
010dd6
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-9
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
010dd6
010dd6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-8
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
010dd6
010dd6
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-7
010dd6
- Perl 5.26 rebuild
010dd6
010dd6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-6
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
010dd6
010dd6
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-5
010dd6
- Perl 5.24 rebuild
010dd6
010dd6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-4
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
010dd6
010dd6
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.014-3
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
010dd6
010dd6
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-2
010dd6
- Perl 5.22 rebuild
010dd6
010dd6
* Wed Dec 10 2014 Paul Howarth <paul@city-fan.org> - 0.014-1
010dd6
- Update to 0.014
010dd6
  - Avoid assuming that t/todo.t is always called t/todo.t
010dd6
- Classify buildreqs by usage
010dd6
- Use %%license
010dd6
010dd6
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.013-3
010dd6
- Perl 5.20 rebuild
010dd6
010dd6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.013-2
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
010dd6
010dd6
* Tue Sep 24 2013 Paul Howarth <paul@city-fan.org> - 0.013-1
010dd6
- Update to 0.013
010dd6
  - Rebuild to get a newer compile test that may work on 5.6.x
010dd6
010dd6
* Tue Sep 17 2013 Paul Howarth <paul@city-fan.org> - 0.012-1
010dd6
- Update to 0.012
010dd6
  - Go back to auto-detecting the required Test::More, reverting the changes
010dd6
    made for CPAN RT#62699
010dd6
- Drop support for all current EL releases (5 and 6) since we need Test::More
010dd6
  version 0.96 or later for the test suite
010dd6
010dd6
* Tue Sep 17 2013 Paul Howarth <paul@city-fan.org> - 0.011-1
010dd6
- Update to 0.011
010dd6
  - More clearly (and correctly) document the way NOT to use Test::Fatal
010dd6
  - Try to fix $TODO not working when the user test uses $T::B::Level
010dd6
- Explicitly run the extra tests
010dd6
- Package examples directory as documentation
010dd6
- Don't need to remove empty directories from the buildroot
010dd6
- Drop %%defattr, redundant since rpm 4.4
010dd6
010dd6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-7
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
010dd6
010dd6
* Wed Jul 24 2013 Petr Pisar <ppisar@redhat.com> - 0.010-6
010dd6
- Perl 5.18 rebuild
010dd6
010dd6
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-5
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
010dd6
010dd6
* Thu Oct 18 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-4
010dd6
- Specify all dependencies
010dd6
010dd6
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-3
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
010dd6
010dd6
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 0.010-2
010dd6
- Perl 5.16 rebuild
010dd6
010dd6
* Thu Feb 16 2012 Paul Howarth <paul@city-fan.org> - 0.010-1
010dd6
- Update to 0.010
010dd6
  - Avoid tickling an overloading bug in perl 5.6 during testing
010dd6
    (CPAN RT#74847)
010dd6
010dd6
* Fri Feb 10 2012 Paul Howarth <paul@city-fan.org> - 0.009-1
010dd6
- Update to 0.009
010dd6
  - Advise against using isnt(exception{...},undef)
010dd6
010dd6
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.008-2
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
010dd6
010dd6
* Mon Nov  7 2011 Paul Howarth <paul@city-fan.org> - 0.008-1
010dd6
- Update to 0.008
010dd6
  - Revert the mistake by which 0.004 allowed blocks after "exception" as well
010dd6
    as "success"
010dd6
- BR: perl(Carp)
010dd6
- Update patch for building with ExtUtils::MakeMaker < 6.30
010dd6
010dd6
* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.006-2
010dd6
- Perl mass rebuild
010dd6
010dd6
* Thu Jun  2 2011 Paul Howarth <paul@city-fan.org> - 0.006-1
010dd6
- Update to 0.006
010dd6
  - Crank back the Test::More and Exporter requirements (CPAN RT#62699)
010dd6
  - Add lives_ok and dies_ok emulation (CPAN RT#67598)
010dd6
- Versions patch replaced by workaround for old ExtUtils::MakeMaker
010dd6
- BR: perl(Test::Builder::Tester)
010dd6
010dd6
* Tue Apr 26 2011 Paul Howarth <paul@city-fan.org> - 0.005-1
010dd6
- Update to 0.005
010dd6
  - Fix the logic that picks tests for 5.13.1+
010dd6
010dd6
* Tue Apr 26 2011 Paul Howarth <paul@city-fan.org> - 0.004-1
010dd6
- Update to 0.004
010dd6
  - success blocks now allow trailing blocks like finally, catch, etc.
010dd6
- Remove remaining uses of macros for commands
010dd6
- Re-order %%install section to conventional position in spec
010dd6
010dd6
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.003-2
010dd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
010dd6
010dd6
* Fri Oct 29 2010 Paul Howarth <paul@city-fan.org> - 0.003-1
010dd6
- Update to 0.003
010dd6
  - More tests for false exceptions, especially on 5.13
010dd6
- Update versions patch
010dd6
010dd6
* Thu Oct 28 2010 Paul Howarth <paul@city-fan.org> - 0.002-1
010dd6
- Update to 0.002
010dd6
  - Add tests for handling of false exceptions
010dd6
  - Fix precedence error in documentation
010dd6
- Update versions patch
010dd6
010dd6
* Wed Oct 27 2010 Paul Howarth <paul@city-fan.org> - 0.001-2
010dd6
- Sanitize spec for Fedora submission
010dd6
010dd6
* Tue Oct 26 2010 Paul Howarth <paul@city-fan.org> - 0.001-1
010dd6
- Initial RPM version