Wed, 11 Nov 2026 08:49:51 CST | login

Information for RPM perl-Context-Preserve-0.03-4.oc9.src.rpm

ID349745
Buildperl-Context-Preserve-0.03-4.oc9
Nameperl-Context-Preserve
Version0.03
Release4.oc9
Epoch
Archsrc
DraftFalse
SummaryRun code after a subroutine call, preserving the context
DescriptionSometimes 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.
Build Time2025-06-13 08:33:50 GMT
Size37.55 KB
f4ad0a4007738e6a4f186e0470f2f847
LicenseGPL-1.0-or-later OR Artistic-1.0-Perl
Buildrootdist-oc9-epol-build-152106-79731
Provides
perl-Context-Preserve = 0.03-4.oc9
Obsoletes No Obsoletes
Conflicts No Conflicts
Requires
coreutils
make
perl(Carp)
perl(Exporter)
perl(ExtUtils::MakeMaker) >= 6.76
perl(File::Spec)
perl(Test::Exception)
perl(Test::More)
perl(base)
perl(ok)
perl(strict)
perl(warnings)
perl-generators
perl-interpreter
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
Recommends No Recommends
Suggests No Suggests
Supplements No Supplements
Enhances No Enhances
Files
1 through 2 of 2
Name ascending sort Size
Context-Preserve-0.03.tar.gz25.31 KB
perl-Context-Preserve.spec2.44 KB
Component of No Buildroots