Name : perl-Sub-Infix
| |
Version : 0.004
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 18:03:31
|
Group : Development/Libraries/Perl
| Source RPM : perl-Sub-Infix-0.004-lp154.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : create a fake infix operator
|
Description :
Sub::Infix creates fake infix operators using overloading. It doesn\'t use source filters, or the Devel::Declare manpage, or any of that magic. (Though Devel::Declare isn\'t magic enough to define infix operators anyway; I know; I\'ve tried.) It\'s pure Perl, has no non-core dependencies, and runs on Perl 5.6.
The price you pay for its simplicity is that you cannot define an operator that can be used like this:
my $five = 2 plus 3;
Instead, the operator needs to be wrapped with real Perl operators in one of three ways:
my $five = 2 |plus| 3; my $five = 2 /plus/ 3; my $five = 2 < < plus>> 3;
The advantage of this is that it gives you three different levels of operator precedence.
You can also call the function a slightly less weird way:
my $five = plus->(2, 3);
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-S/15.4/noarch |