diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2013-03-10 02:18:56 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2013-03-10 02:18:56 +0800 |
commit | 9c609522d50bba1572ea7966853a123321dca58c (patch) | |
tree | 5a1b0816f6caf365eb0b742bdab7fc2f6b23d05f /devel/Makefile | |
parent | 05b74714da57d8d41a41ece4711a753a277a0444 (diff) | |
download | freebsd-ports-gnome-9c609522d50bba1572ea7966853a123321dca58c.tar.gz freebsd-ports-gnome-9c609522d50bba1572ea7966853a123321dca58c.tar.zst freebsd-ports-gnome-9c609522d50bba1572ea7966853a123321dca58c.zip |
- Add p5-lexical-underscore 0.001
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: http://search.cpan.org/dist/lexical-underscore/
Diffstat (limited to 'devel/Makefile')
-rw-r--r-- | devel/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index cf5a8838d4b8..6d8cab0bf991 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2951,6 +2951,7 @@ SUBDIR += p5-iCal-Parser SUBDIR += p5-indirect SUBDIR += p5-latest + SUBDIR += p5-lexical-underscore SUBDIR += p5-lib-abs SUBDIR += p5-libalarm SUBDIR += p5-libxml-enno |