Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uasi/acme-then
The do-this-then-do-that utility
https://github.com/uasi/acme-then
Last synced: 17 days ago
JSON representation
The do-this-then-do-that utility
- Host: GitHub
- URL: https://github.com/uasi/acme-then
- Owner: uasi
- Created: 2011-11-01T06:32:43.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-01T10:32:24.000Z (about 13 years ago)
- Last Synced: 2024-11-05T20:50:25.165Z (2 months ago)
- Language: Perl
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Acme::Then - The do-this-then-do-that utilityINSTALLATION
To install this module, run the following commands:perl Makefile.PL
make
make test
make installSYNOPSIS
Acme::Then::do {
...
} then {
...
LAST if ...;
} then {
...
};You can turn a callback chain
do_something(cb => sub {
do_something(cb => sub {
do_something(cb => sub {
my ($res) = @_;
say $res;
});
});
});into
Acme::Then::do {
do_something(cb => NEXT);
} then {
do_something(cb => NEXT);
} then {
do_something(cb => NEXT);
} then {
my ($res) = @_;
say $res;
};DESCRIPTION
Do this, then do that.FUNCTIONS
do
`do' {} then {};then
do {} `then' {};LAST
Exits from a do-then construct.NEXT
Returns a coderef. The arguments to the coderef are set to the next
block's `@_'. The coderef should not be called more than once within the
same block.AUTHOR
Tomoki AonumaLICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.