Promise...red::EV(3)

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

πŸ’– Promises::Deferred::EV β€” the manual, but make it cute πŸ’–

okay bestie, gather round, because this is Promise...red::EV(3), a page from the User Contributed Perl Documentation collection, and it's literally about making your Promises behave. slay.


✨ NAME ✨

Promises::Deferred::EV β€” an implementation of Promises in Perl. that's it, that's the whole name, and honestly? iconic.


🌸 VERSION 🌸

version 1.05 β€” yes queen, we're on 1.05, write it down.


πŸŽ€ SYNOPSIS πŸŽ€

use Promises backend => ['EV'], qw[ deferred collect ];

# ... everything else is the same

bestie the whole point is that everything else is the same. you just flip the backend and vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, and it's a real one: the Promise/A+ spec strongly suggests that the callbacks you hand to then should be run asynchronously β€” meaning they run in the next turn of the event loop, not right this second. this module is the one that makes that happen, and it does it using the EV module. no cap. πŸ”₯

now, the important part, the part where you don't make things weird:

module authors should not care which event loop will be used. like, at all. don't be nosy. instead, just use the Promises module directly, like this:

package MyClass;

use Promises qw(deferred collect);

see? no event loop mentioned. none. keep it that way. 🫢

then, at the very start of the application, the end users of the module get to pick which backend they want:

use Promises -backend => ['EV'];
use MyClass;

boom. backend chosen, module author blissfully unaware, everybody ate. that's the whole design and it's giving separation of concerns. πŸ‘‘


🌈 AUTHOR 🌈

Stevan Little <stevan.little@iinteractive.com> β€” thank you for your service, legend. 🫑


this software is copyright (c) 2025, 2017, 2014, 2012 by Infinity Interactive, Inc.

and listen, because this part matters: this is free software. you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. πŸ’–


πŸŽ€ okay so quick recap bestie: it's Promises::Deferred::EV, it's version 1.05, it makes then callbacks run asynchronously via EV, module authors stay out of it, end users pick the backend, Stevan Little wrote it, Infinity Interactive owns the copyright, and it's free as long as you follow the Perl 5 terms. you got this. 🧚

and that's a wrap, my love β€” this page came from perl v5.42.0, dated 2025-07-25, and it's filed under Promise...red::EV(3) because someone's manpage renderer said "we only have room for so many characters" and honestly? valid. go forth and resolve your promises. πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from