Promise...red::AE(3)
π Promises::Deferred::AE π
okay so bestie, welcome to Promises::Deferred::AE(3) β a User Contributed Perl Documentation page, no cap. this is the AE-flavoured implementation of Promises in Perl. let's get into it β¨
πΈ NAME πΈ
Promises::Deferred::AE β an implementation of Promises in Perl π«Ά
β VERSION β
version 1.05 β yes she's been around a minute and she still slays π
β¨ SYNOPSIS β¨
use Promises backend => ['AE'], qw[ deferred collect ];
# ... everything else is the same
like, literally everything else stays the same, that's the whole vibe π₯
π¦ DESCRIPTION π¦
okay so the tea: the Promise/A+ spec is strongly suggesting that the callbacks you hand to then should run asynchronously β meaning in the next turn of the event loop. not right this second, not in the middle of whatever you were doing. next turn. periodt. π
this module is the one that makes that happen, and it does it using the AE module. that's the whole job. she's a specialist π
and here's the part that's lowkey iconic: module authors should not care which event loop is gonna be used. don't pick favourites, don't hardcode a backend, just use the Promises module directly and let the universe sort it out:
package MyClass;
use Promises qw(deferred collect);
then the end users β the people actually running the app β get to pick which backend they want, at the very start of the application:
use Promises -backend => ['AE'];
use MyClass;
main character energy: the author writes the code, the user chooses the loop. everyone eats. π
ngl this is the good separation-of-concerns behaviour, so likeβ¦ respect it π
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com> β thank you for your service king π«‘
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2025, 2017, 2014, 2012 by Infinity Interactive, Inc.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. fr fr, go wild, just keep the terms π§
and that's the whole page bestie π shoutout to perl v5.42.0 and the date stamp 2025-07-25 for making it official β this was Promise...red::AE(3), iykyk β¨πΈπ
π¦ where this page comes from
- fedora 43: perl-Promises 1.05-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms