Port details on branch 2022Q2 |
- p5-lexical-underscore Access lexical underscore of your caller
- 0.004 devel =0 0.004Version of this port present on the latest quarterly branch.
- Maintainer: sunpoet@FreeBSD.org
- Port Added: 2013-03-09 18:19:18
- Last Update: 2022-09-07 21:58:51
- Commit Hash: fb16dfe
- Also Listed In: perl5
- License: ART10 GPLv1+
- WWW:
- https://metacpan.org/release/lexical-underscore
- Description:
- Starting with Perl 5.10, it is possible to create a lexical version of the Perl
default variable $_. Certain Perl constructs like the given keyword
automatically use a lexical $_ rather than the global $_.
It is occasionallly useful for a sub 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; in
particular it can only appear as the final required argument in a prototype, and
there is no way of the sub differentiating between an explicitly passed argument
and $_.
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.
Wrapping lexical::underscore in ${ ... } dereferences the scalar reference,
allowing you to access (and even assign to) it.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - Dependency lines:
-
- p5-lexical-underscore>0:devel/p5-lexical-underscore
- To install the port:
- cd /usr/ports/devel/p5-lexical-underscore/ && make install clean
- To add the package, run one of these commands:
- pkg install devel/p5-lexical-underscore
- pkg install p5-lexical-underscore
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: p5-lexical-underscore
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1485968698
SHA256 (lexical-underscore-0.004.tar.gz) = 6bd5d1469e161e199a9bd7fdde957e04176c5707cb059597a23ca3e130fb1134
SIZE (lexical-underscore-0.004.tar.gz) = 14512
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- p5-PadWalker>=0 : devel/p5-PadWalker
- perl5>=5.32.r0<5.33 : lang/perl5.32
- perl5>=5.32.r0<5.33 : lang/perl5.32
- Runtime dependencies:
-
- p5-PadWalker>=0 : devel/p5-PadWalker
- perl5>=5.32.r0<5.33 : lang/perl5.32
- This port is required by:
- for Build
-
- devel/p5-Scalar-Does
- for Run
-
- devel/p5-Scalar-Does
Configuration Options:
- No options to configure
- Options name:
- devel_p5-lexical-underscore
- USES:
- perl5
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|