You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
177 lines
6.7 KiB
177 lines
6.7 KiB
Name: perl-Context-Preserve
|
|
Summary: Run code after a subroutine call, preserving the context
|
|
Version: 0.03
|
|
Release: 16%{?dist}
|
|
License: GPL+ or Artistic
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/Context-Preserve-%{version}.tar.gz
|
|
URL: https://metacpan.org/release/Context-Preserve
|
|
BuildArch: noarch
|
|
# Build
|
|
BuildRequires: coreutils
|
|
BuildRequires: make
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
BuildRequires: perl(strict)
|
|
BuildRequires: perl(warnings)
|
|
# Runtime
|
|
BuildRequires: perl(base)
|
|
BuildRequires: perl(Carp)
|
|
BuildRequires: perl(Exporter)
|
|
# Tests only
|
|
BuildRequires: perl(File::Spec)
|
|
BuildRequires: perl(ok)
|
|
BuildRequires: perl(Test::Exception)
|
|
BuildRequires: perl(Test::More)
|
|
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
|
|
|
|
%description
|
|
Sometimes you need to call a function, get the results, act on the results,
|
|
then return the result of the function. This is painful because of contexts;
|
|
the original function can behave different if it's called in void, scalar, or
|
|
list context. You can ignore the various cases and just pick one, but that's
|
|
fragile. To do things right, you need to see which case you're being called
|
|
in, and then call the function in that context. This results in 3 code paths,
|
|
which is a pain to type in (and maintain). This module automates the process.
|
|
You provide a code reference that is the "original function", and another code
|
|
reference to run after running the original. You can modify the return value
|
|
(aliased to @_) here, and do whatever else you need to do. 'wantarray' is
|
|
correct inside both code references; in "after", though, the return value is
|
|
ignored and the value 'wantarray' returns is related to the context that the
|
|
original function was called in.
|
|
|
|
%prep
|
|
%setup -q -n Context-Preserve-%{version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
%{make_build}
|
|
|
|
%install
|
|
%{make_install}
|
|
%{_fixperms} %{buildroot}/*
|
|
|
|
%check
|
|
make test
|
|
|
|
%files
|
|
%license LICENCE
|
|
%doc CONTRIBUTING README Changes
|
|
%{perl_vendorlib}/*
|
|
%{_mandir}/man3/*.3*
|
|
|
|
%changelog
|
|
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-16
|
|
- Perl 5.36 rebuild
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-15
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-14
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-13
|
|
- Perl 5.34 rebuild
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-12
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
* Fri Aug 21 2020 Petr Pisar <ppisar@redhat.com> - 0.03-11
|
|
- Modernize a spec file
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-10
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-9
|
|
- Perl 5.32 rebuild
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-6
|
|
- Perl 5.30 rebuild
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-3
|
|
- Perl 5.28 rebuild
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.03-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
* Mon Nov 06 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.03-1
|
|
- 0.03 bump
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.02-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.02-2
|
|
- Perl 5.26 rebuild
|
|
|
|
* Fri May 12 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.02-1
|
|
- 0.02 bump
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.01-19
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.01-18
|
|
- Perl 5.24 rebuild
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.01-17
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Tue Jan 26 2016 Petr Šabata <contyk@redhat.com> - 0.01-16
|
|
- Package cleanup
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-15
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.01-14
|
|
- Perl 5.22 rebuild
|
|
|
|
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.01-13
|
|
- Perl 5.20 rebuild
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-12
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-11
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Mon Jul 22 2013 Petr Pisar <ppisar@redhat.com> - 0.01-10
|
|
- Perl 5.18 rebuild
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-9
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Wed Jun 13 2012 Petr Pisar <ppisar@redhat.com> - 0.01-7
|
|
- Perl 5.16 rebuild
|
|
|
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-6
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Tue Jun 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.01-5
|
|
- Perl mass rebuild
|
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.01-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Wed Dec 15 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.01-3
|
|
- 661697 rebuild for fixing problems with vendorach/lib
|
|
|
|
* Fri Apr 30 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.01-2
|
|
- Mass rebuild with perl-5.12.0
|
|
|
|
* Fri Mar 05 2010 Chris Weyl <cweyl@alumni.drew.edu> 0.01-1
|
|
- specfile by Fedora::App::MaintainerTools 0.004
|