Access your caller's lexical underscore
29.54 KB
built 2026-10-17 03:00:34 GMT
Description
Starting with Perl 5.10, it is possible to create a lexical version of the
Perl default variable $_.
It is occasionally useful for a subroutine to be able to access its caller's
$_ variable regardless of whether it was lexical or not. The "(_)" sub
prototype is the official way to do so, however there are sometimes
disadvantages to this.
The "lexical::underscore" function returns a scalar reference to either
a lexical $_ variable somewhere up the call stack (using PadWalker magic), or
to the global $_ if there was no lexical version.
Dependencies
13 totalRequires12
- findutils
- make
- perl(:VERSION) >= 5.8
- perl(ExtUtils::MakeMaker) >= 6.17
- perl(Test::More) >= 0.61
- perl(if)
- perl(strict)
- perl(warnings)
- perl-generators
- perl-interpreter
- rpmlib(CompressedFileNames) <= 3.0.4-1
- rpmlib(FileDigests) <= 4.6.0-1
Provides1
- perl-lexical-underscore = 0.004-27.fc45
ObsoletesNo Obsoletes
ConflictsNo Conflicts
RecommendsNo Recommends
SuggestsNo Suggests
SupplementsNo Supplements
EnhancesNo Enhances
Files
2Name ![]() |
Size |
|---|---|
| lexical-underscore-0.004.tar.gz | 14.17 KB |
| perl-lexical-underscore.spec | 5.61 KB |
Files 1–2 of 2
Component of
buildroots that installed this RPMNo Buildroots
