| 1 |
Source: liblexical-underscore-perl |
| 2 |
Section: perl |
| 3 |
Priority: optional |
| 4 |
Build-Depends: |
| 5 |
debhelper-compat (= 13), |
| 6 |
perl, |
| 7 |
libpadwalker-perl |
| 8 |
Maintainer: Debian Perl Group <[email protected]> |
| 9 |
Uploaders: Jonas Smedegaard <[email protected]> |
| 10 |
Standards-Version: 4.7.2 |
| 11 |
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/liblexical-underscore-perl.git |
| 12 |
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/liblexical-underscore-perl |
| 13 |
Homepage: https://metacpan.org/release/lexical-underscore |
| 14 |
Testsuite: autopkgtest-pkg-perl |
| 15 |
|
| 16 |
Package: liblexical-underscore-perl |
| 17 |
Architecture: all |
| 18 |
Depends: |
| 19 |
libpadwalker-perl, |
| 20 |
${misc:Depends}, |
| 21 |
${perl:Depends} |
| 22 |
Description: access your caller's lexical underscore |
| 23 |
Starting with Perl 5.10, it is possible to create a lexical version of |
| 24 |
the Perl default variable $_. Certain Perl constructs like the "given" |
| 25 |
keyword automatically use a lexical $_ rather than the global $_. |
| 26 |
. |
| 27 |
It is occasionallly useful for a sub to be able to access its caller's |
| 28 |
$_ variable regardless of whether it was lexical or not. The "(_)" sub |
| 29 |
prototype is the official way to do so, however there are sometimes |
| 30 |
disadvantages to this; in particular it can only appear as the final |
| 31 |
required argument in a prototype, and there is no way of the sub |
| 32 |
differentiating between an explicitly passed argument and $_. |
| 33 |
. |
| 34 |
lexical::underscore allows you to access your caller's lexical $_ |
| 35 |
variable as easily as: |
| 36 |
. |
| 37 |
${lexical::underscore()} |