Name : perl-Acme-ComeFrom
| |
Version : 0.11
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.10.1
| Date : 2023-07-20 16:48:24
|
Group : Development/Libraries/Perl
| Source RPM : perl-Acme-ComeFrom-0.11-lp155.10.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Parallel Goto-in-reverse
|
Description :
*INTERCAL* programmers have for a long time monopolized the enormously powerful construct \'COME FROM\', both as a flow-control replacement to \'goto\', and as a simple way to mark parallel execution branches in the multi-thread variant.
But now, with *Acme::ComeFrom*, we Perl hackers can finally be on par with them in terms of wackiness, if not in obfuscation.
Just like \'goto\', \'comefrom\' comes in three different flavors:
* comefrom LABEL
The \'comefrom-LABEL\' form finds the statement labeled with \'LABEL\' and jumps to the \'comefrom\' each time just _before_ that statement\'s execution. The \'comefrom\' may not be inside any construct that requires initialization, such as a subroutine or a \'foreach\' loop, unless the targeting \'LABEL\' is also in the same construct.
* comefrom EXPR
The \'comefrom-EXPR\' form expects a label name, whose scope will be resolved dynamically. This allows for computed \'comefrom\'s by checking the \'EXPR\' before every label (a.k.a. watchpoints), so you can write:
comefrom (\"FOO\", \"BAR\", \"GLARCH\")[$i];
Starting from version 0.05, the value of EXPR is evaluated each time, instead of the old _frozen at the first check_ behaviour. If this breaks your code -- as if there\'s any code based on comefrom -- You may retain the original behaviour by assigning a true value to \'$Acme::ComeFrom::CacheEXPR\'.
* comefrom &NAME
The \'comefrom-&NAME\' form is quite different from the other forms of \'comefrom\'. In fact, it isn\'t a comefrom in the normal sense at all, and doesn\'t have the stigma associated with other \'comefrom\'s. Instead, it installs a post-processing handler for the subroutine, and a jump would be made just _after_ the subroutine\'s execution.
If two or more \'comefrom\' were applied to the same LABEL, EXPR or NAME, they will be executed simultaneously via \'fork()\'. The forking are ordered by their occurrances, with the parent process receiving the last one.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/15.5/noarch |