Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

perl-lexical-underscore-0.4.0-3.mga8 RPM for noarch

From Mageia 8 for i586 / media / core / release

Name: perl-lexical-underscore Distribution: Mageia
Version: 0.4.0 Vendor: Mageia.Org
Release: 3.mga8 Build date: Wed Feb 12 15:32:13 2020
Group: Development/Perl Build host: localhost
Size: 31863 Source RPM: perl-lexical-underscore-0.4.0-3.mga8.src.rpm
Packager: umeabot <umeabot>
Url: http://search.cpan.org/dist/lexical-underscore
Summary: Access your caller's lexical underscore
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 $_.

Provides

Requires

License

GPL+ or Artistic

Changelog

* Wed Feb 12 2020 umeabot <umeabot> 0.4.0-3.mga8
  + Revision: 1507138
  - Mageia 8 Mass Rebuild
* Thu Sep 20 2018 umeabot <umeabot> 0.4.0-2.mga7
  + Revision: 1287495
  - Mageia 7 Mass Rebuild

Files

/usr/share/doc/perl-lexical-underscore
/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
/usr/share/perl5/vendor_perl/lexical
/usr/share/perl5/vendor_perl/lexical/underscore.pm


Generated by rpm2html 1.8.1

Fabrice Bellet, Tue Apr 9 16:22:09 2024