Sun, 01 Nov 2026 06:37:34 UTC Log in
Run code after a subroutine call, preserving the context 21.87 KB built 2026-10-16 17:50:03 GMT

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.

Dependencies

12 total
Requires10
  • perl(Carp)
  • perl(Exporter)
  • perl(base)
  • perl(strict)
  • perl(warnings)
  • perl-libs
  • rpmlib(CompressedFileNames) <= 3.0.4-1
  • rpmlib(FileDigests) <= 4.6.0-1
  • rpmlib(PayloadFilesHavePrefix) <= 4.0-1
  • rpmlib(PayloadIsZstd) <= 5.4.18-1
Provides2
  • perl(Context::Preserve) = 0.03
  • perl-Context-Preserve = 0.03-26.fc45
ObsoletesNo Obsoletes
ConflictsNo Conflicts
RecommendsNo Recommends
SuggestsNo Suggests
SupplementsNo Supplements
EnhancesNo Enhances

Files

9
Files 1–9 of 9

Component of

buildroots that installed this RPM
Buildroot descending sort Created State
f45-build-27685-625 2026-10-17 02:51:53 expired
f45-build-26883-619 2026-10-17 01:26:17 expired
f45-build-26517-617 2026-10-17 00:51:06 expired
f45-build-26509-617 2026-10-17 00:48:04 expired
f45-build-26123-614 2026-10-17 00:05:42 expired
f45-build-25894-613 2026-10-16 23:44:08 expired
f45-build-25117-609 2026-10-16 22:24:49 expired
f45-build-25090-609 2026-10-16 22:19:49 expired
f45-build-25088-609 2026-10-16 22:19:48 expired
f45-build-25079-609 2026-10-16 22:19:46 expired
f45-build-23968-601 2026-10-16 20:09:15 expired
f45-build-23864-599 2026-10-16 19:56:17 expired
f45-build-23022-595 2026-10-16 18:30:09 expired
f45-build-22901-594 2026-10-16 18:16:09 expired
f45-build-22866-594 2026-10-16 18:14:50 expired
f45-build-22862-594 2026-10-16 18:13:54 expired
f45-build-22859-594 2026-10-16 18:12:45 expired
f45-build-22842-594 2026-10-16 18:10:45 expired
f45-build-22838-594 2026-10-16 18:10:45 expired
f45-build-22827-594 2026-10-16 18:10:37 expired
f45-build-22826-594 2026-10-16 18:10:36 expired
f45-build-22822-594 2026-10-16 18:09:43 expired
f45-build-22821-594 2026-10-16 18:09:43 expired
f45-build-22812-594 2026-10-16 18:09:35 expired
f45-build-22795-594 2026-10-16 18:08:31 expired
Buildroots 1–25 of 25