Name : perl-Acme-Lvalue
| |
Version : 0.03
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.4.1
| Date : 2023-07-20 17:21:09
|
Group : Development/Libraries/Perl
| Source RPM : perl-Acme-Lvalue-0.03-lp155.4.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Generalized lvalue subroutines
|
Description :
This module makes a number of perl builtins return lvalues, letting you assign to them. This lets you do things like:
reverse(hex $x) = \'9558295373\';
When you load this module, you can pass a list of 0 or more import specifications. If you don\'t pass any, nothing is exported. Every import specification must be one of the following:
* * The string \':builtins\'.
This overrides the following builtins:
\'chr\', \'cos\', \'defined\', \'exp\', \'hex\', \'length\', \'log\', \'oct\', \'ord\', \'quotemeta\', \'reverse\', \'sin\', \'sqrt\'.
* * Any of the builtins listed above.
This lets you pick and choose which builtins to override.
* * An array reference of the form [_NAME_, _CODEREF_1_, _CODEREF_2_].
This lets you create customized invertible lvalue functions. _NAME_ is the name of the function that should be generated, _CODEREF_1_ is the implementation that should be called by the function, and _CODEREF_2_ is the inverse operation that should be called when the result is assigned to.
That is, after \'use Acme::Lvalue [\'foo\', $REF_1, $REF_2]\', using \'foo($x)\' as normal is equivalent to \'$REF_1->($x)\' while using \'foo($x) = $y\' is equivalent to \'$x = $REF_2->($y)\'.
Example:
use Acme::Lvalue [\'succ\', sub { $_[0] + 1 }, sub { $_[0] - 1 }];
my $x = succ 4; # $x == 5 succ($x) = 43; # $x == 42
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/15.5/noarch |