perl-lexical-underscore-0.1.0-2.mga4.noarch.rpm


Advertisement

Description

perl-lexical-underscore - Access your caller's lexical underscore

Property Value
Distribution Mageia 4.1
Repository Mageia Core i586
Package name perl-lexical-underscore
Package version 0.1.0
Package release 2.mga4
Package architecture noarch
Package type rpm
Installed size 32.35 KB
Download size 18.66 KB
Official Mirror distrib-coffee.ipsl.jussieu.fr
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 $_.
This caused me problems with Scalar::Does, because I wanted to enable
the "does" function to be called as either:
does($thing, $role);
does($role);  # assumes $thing = $_
With "_" in the prototype, $_ was passed to the function at the end of
its argument list; effectively "does($role, $thing)", making it
impossible to tell which argument was the role.
Enter "lexical::underscore" which allows you to access your caller's
lexical $_ variable as easily as:
${lexical::underscore()}
You can access lexical $_ further up the call stack using:
${lexical::underscore($level)}
If you happen to ask for $_ at a level where no lexical $_ is available,
you get the global $_ instead.
This module does work on Perl 5.8 but as there is no lexical $_, always
returns the global $_.

Alternatives

Package Version Architecture Repository
perl-lexical-underscore-0.1.0-2.mga4.noarch.rpm 0.1.0 noarch Mageia Core
perl-lexical-underscore - - -

Requires

Name Value
perl(PadWalker) -
perl-base >= 2:5.18.1

Provides

Name Value
perl(lexical::underscore) -
perl-lexical-underscore == 0.1.0-2.mga4

Download

Type URL
Binary Package perl-lexical-underscore-0.1.0-2.mga4.noarch.rpm
Source Package perl-lexical-underscore-0.1.0-2.mga4.src.rpm

Install Howto

  1. Enable Mageia Core repository on "Install and Remove Software"
  2. Update packages list:
    # urpmi.update -a
  3. Install perl-lexical-underscore rpm package:
    # urpmi perl-lexical-underscore

Files

Path
/usr/lib/perl5/vendor_perl/5.18.1/lexical/underscore.pm
/usr/share/doc/perl-lexical-underscore/Changes
/usr/share/doc/perl-lexical-underscore/LICENSE
/usr/share/doc/perl-lexical-underscore/META.yml
/usr/share/doc/perl-lexical-underscore/MYMETA.yml
/usr/share/doc/perl-lexical-underscore/README
/usr/share/doc/perl-lexical-underscore/SIGNATURE
/usr/share/man/man3/lexical::underscore.3pm.xz

Changelog

2013-10-21 - umeabot <umeabot> 0.1.0-2.mga4
+ Revision: 537439
- Mageia 4 Mass Rebuild
2013-09-26 - sander85 <sander85> 0.1.0-1.mga4
+ Revision: 487018
- imported package perl-lexical-underscore

See Also

Package Description
perl-lib-abs-0.920.0-4.mga4.noarch.rpm Get pathname of current working directory
perl-libapreq2-2.130.0-14.mga4.i586.rpm Apache Request Library Perl Glue
perl-libguestfs-1.24.5-1.mga4.i586.rpm Perl bindings for libguestfs
perl-libintl-perl-1.230.0-2.mga4.i586.rpm A localization library for Perl
perl-libwww-perl-6.50.0-2.mga4.noarch.rpm The World-Wide Web library for Perl
perl-libxml-perl-0.80.0-4.mga4.noarch.rpm Various perl modules and script for working with XML
perl-local-lib-1.8.18-2.mga4.noarch.rpm create and use a local lib/ for perl modules with PERL5LIB
perl-lvalue-0.10.0-4.mga4.noarch.rpm use lvalue subroutines with ease
perl-macro-0.60.0-3.mga4.noarch.rpm Macro.pm compiler backend
perl-multidimensional-0.11.0-2.mga4.i586.rpm Disables multidmensional array emulation
perl-namespace-autoclean-0.140.0-2.mga4.noarch.rpm Keep imports out of your namespace
perl-namespace-clean-0.240.0-3.mga4.noarch.rpm Keep imports and functions out of your namespace
perl-namespace-sweep-0.6.0-4.mga4.noarch.rpm Sweep up imported subs in your classes
perl-ogd-0.30.0-3.mga4.noarch.rpm Ordered global destruction of objects stored in globals
perl-openbabel-2.3.2-3.mga4.i586.rpm Perl wrapper for the Open Babel library
Advertisement
Advertisement