Projects
Eulaceura:Factory
perl-Context-Preserve
_service:obs_scm:perl-Context-Preserve.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:perl-Context-Preserve.spec of Package perl-Context-Preserve
%global _empty_manifest_terminate_build 0 Name: perl-Context-Preserve Version: 0.03 Release: 1 Summary: Run code after a subroutine call, preserving the context the subroutine would have seen if it were the last statement in the caller License: GPL-1.0-only or Artistic-1.0-Perl Group: Development/Libraries URL: http://search.cpan.org/dist/Context-Preserve/ Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Context-Preserve-%{version}.tar.gz BuildArch: noarch BuildRequires: perl >= 0:5.006 BuildRequires: perl-generators BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(File::Spec) BuildRequires: perl(ok) BuildRequires: perl(strict) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) BuildRequires: perl(warnings) Requires: perl(base) Requires: perl(Carp) Requires: perl(Exporter) Requires: perl(strict) Requires: perl(warnings) %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). %package help Summary : Run code after a subroutine call, preserving the context the subroutine would have seen if it were the last statement in the caller Provides: perl-Context-Preserve-doc %description help 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). %prep %setup -q -n Context-Preserve-%{version} %build export PERL_MM_OPT="" %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install export PERL_MM_OPT="" rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* pushd %{buildroot} touch filelist.lst if [ -d usr/bin ];then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ];then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ];then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib ];then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi popd mv %{buildroot}/filelist.lst . %check || : make test %clean rm -rf $RPM_BUILD_ROOT %files -f filelist.lst %defattr(-,root,root,-) %doc Changes CONTRIBUTING dist.ini LICENCE META.json README %{perl_vendorlib}/* %files help %{_mandir}/* %changelog * Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 0.03-1 - Specfile autogenerated by Perl_Bot
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2