p5-lexical-underscore-0.004.txz


Advertisement

Description

p5-lexical-underscore - Access lexical underscore of your caller

Property Value
Distribution FreeBSD 11
Repository FreeBSD Ports Latest i386
Package filename p5-lexical-underscore-0.004.txz
Package name p5-lexical-underscore
Package version 0.004
Package release -
Package architecture i386
Package type txz
Category devel perl5
Homepage https://metacpan.org/release/lexical-underscore
License GPLv1+, ART10
Maintainer sunpoet@FreeBSD.org
Download size 11.29 KB
Installed size 42.57 KB
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.
WWW: https://metacpan.org/release/lexical-underscore

Alternatives

Package Version Architecture Repository
p5-lexical-underscore-0.004.txz 0.004 i386 FreeBSD Ports Quarterly
p5-lexical-underscore-0.004.txz 0.004 amd64 FreeBSD Ports Quarterly
p5-lexical-underscore-0.004.txz 0.004 amd64 FreeBSD Ports Latest
p5-lexical-underscore - - -

Requires

Name Value
p5-PadWalker = 2.3
perl5 = 5.28.1_1

Download

Type URL
Mirror pkg.freebsd.org
Binary Package p5-lexical-underscore-0.004.txz
Source Package devel/p5-lexical-underscore

Install Howto

Install p5-lexical-underscore txz package:

# pkg install p5-lexical-underscore

See Also

Package Description
p5-lib-abs-0.92_1.txz Relative use lib in absolute way
p5-libalarm-1.0_2.txz Allow multiple, queued alarms
p5-libapreq2-2.13_6.txz Perl binding for the Generic Apache2 Request Library
p5-libservlet-0.9.2_1.txz Servlet API for Perl
p5-libsoldout-0.02_2.txz Convert Markdown text in (X)HTML
p5-libvorbis-0.05_6.txz Perl extension for Ogg Vorbis streams
p5-libwww-6.42.txz Perl5 library for WWW access
p5-libxml-0.08_1.txz Collection of Perl5 modules for working with XML
p5-libxml-enno-1.02_1.txz Group of Perl modules for XML parsing
p5-local-lib-2.000018.txz Perl extension to create and use a local lib/ with PERL5LIB
p5-match-simple-0.010.txz Simplified clone of smartmatch operator
p5-mem-0.4.7.txz Use "in-mem" pkgs and force definitions into mem early
p5-ming-0.4.8.txz Perl module for Ming which allows you to create Flash 4/5 movies
p5-mixin-0.08.txz Mix-in inheritance, an alternative to multiple inheritance
p5-mocked-0.09_2.txz mocked - use mocked libraries in unit tests
Advertisement
Advertisement