{"added":null,"apiVersion":1,"behindSince":null,"buildDepends":[],"categories":["devel","perl5"],"comment":"Access lexical underscore of your caller","compare":null,"dependentCount":null,"description":"Starting with Perl 5.10, it is possible to create a lexical version of the Perl\ndefault variable $_. Certain Perl constructs like the given keyword\nautomatically use a lexical $_ rather than the global $_.\n\nIt is occasionallly useful for a sub to be able to access its caller's $_\nvariable regardless of whether it was lexical or not. The (_) sub prototype is\nthe official way to do so, however there are sometimes disadvantages to this; in\nparticular it can only appear as the final required argument in a prototype, and\nthere is no way of the sub differentiating between an explicitly passed argument\nand $_.\n\nThe lexical::underscore function returns a scalar reference to either a lexical\n$_ variable somewhere up the call stack (using PadWalker magic), or to the\nglobal $_ if there was no lexical version.\n\nWrapping lexical::underscore in ${ ... } dereferences the scalar reference,\nallowing you to access (and even assign to) it.","flavors":[],"html":"https://daemonports.org/dragonfly/devel/p5-lexical-underscore/","kind":"port","lastUpdate":null,"license":["ART10","GPLv1+"],"maintainer":"sunpoet@FreeBSD.org","name":"p5-lexical-underscore","newest":true,"newestVersion":"0.004","noVulnData":false,"origin":"devel/p5-lexical-underscore","otherSystems":[{"maintainer":"sunpoet@FreeBSD.org","newest":true,"origin":"devel/p5-lexical-underscore","path":"/devel/p5-lexical-underscore/","system":"FreeBSD","version":"0.004"},{"maintainer":"sunpoet@FreeBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-lexical-underscore","path":"","system":"HardenedBSD","version":"0.004"},{"maintainer":"sunpoet@FreeBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-lexical-underscore","path":"","system":"GhostBSD","version":"0.004"}],"packages":null,"pkgName":"p5-lexical-underscore-0.004","related":null,"repository":"DPorts","requiredBy":["devel/p5-Scalar-Does"],"requiredByCount":1,"runDepends":["devel/p5-PadWalker","lang/perl5.36"],"status":null,"system":"dragonfly","systemLabel":"DragonFly","version":"0.004","versions":null,"vulnerabilities":null,"www":"https://metacpan.org/release/lexical-underscore"}
