Name : perl-Commands-Guarded
| |
Version : 1.01
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.8.1
| Date : 2023-07-20 19:13:38
|
Group : Development/Libraries/Perl
| Source RPM : perl-Commands-Guarded-1.01-lp155.8.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
Summary : Better scripts through guarded commands
|
Description :
This module implements a deterministic, rectifying variant on Dijkstra\'s guarded commands. Each named step is passed two blocks: an \'ensure\' block that defines a test for a necessary and sufficient condition of the step, and a \'using\' block that will cause that condition to obtain. (If the \'using\' block is ommitted, the step acts as a simple assertion.)
If \'step\' is called in void context (i.e., is not assigned to anything or used as a value), the step is run immediately, as in this pseudocode:
unless (ENSURE) { USING; die unless ENSURE; }
If \'step\' is called in scalar or array context, execution is deferred and instead a Commands::Guarded object is returned, which can be executed as above using the \'do\' method. If \'do\' is given arguments, they will be passed to the \'ensure\' block and (if necessary) the \'using\' block.
The interface to Commands::Guarded is thus a hybrid of exported subroutines (see *SUBROUTINES* below) and non-exported methods (see *METHODS*).
For a detailed discussion of the reason for this module\'s existence, see *RATIONALE* below.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.5/noarch |