Promise...red::AE(3)

πŸ“¦
version 1.05 Β· 2 versions
, in fedora 43

πŸ’– 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 🫑

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