Promises::Promise(3)
π NAME π
Promises::Promise β bestie, it's literally An implementation of Promises in Perl. that's the whole vibe. β¨
π VERSION π
version 1.05 β yes, 1.05. that's the one. no cap. π
π¦ DESCRIPTION π¦
okay so here's the tea β β you do not usually make these things by hand. Promise objects are typically not created by hand, they are typically returned from the promise method of a Promises::Deferred instance. so like, don't go building one in your bedroom at 3am, it's giving unhinged.
the way you should think about it: a Promises::Promise instance is basically a handle for Promises::Deferred instances. that's it. that's the whole job. it's the little sticker on the outside of the box, not the box itself. π«Ά
Most of the documentation here points back to the documentation in thePromises::Deferredmodule. so if you're confused, that's where you go. not here. here is the trailer,Promises::Deferredis the movie. π¬
also, additional lore drop: Promises::Cookbook::GentleIntro contains a long explanation of how this module, and all its components are meant to work together. like, a whole essay. it's iconic, honestly. if you want the full group-chat-backstory, that's your girl. π
β¨ METHODS β¨
every single one of these just politely forwards to the proxied Promises::Deferred instance. it's a proxy, that's its entire personality, and we love her for it. π
new( $deferred )β the constructor only takes one parameter, and that parameter is an instance ofPromises::Deferredthat you want this object to proxy. one. singular. just the one bestie. πΈthen( $callback, $error )β this callsthenon the proxiedPromises::Deferredinstance. go girl, do your thing. π₯chain( @thens )β this callschainon the proxiedPromises::Deferredinstance. a whole list of thens?? obsessed. β¨catch( $error )β this callscatchon the proxiedPromises::Deferredinstance. catching feelings (and errors). πdone( $callback, $error )β this callsdoneon the proxiedPromises::Deferredinstance. and that's on periodt.finally( $callback )β this callsfinallyon the proxiedPromises::Deferredinstance. closure, literally and figuratively. π§timeout( $seconds )β this callstimeouton the proxiedPromises::Deferredinstance. no texting back after that many seconds, iykyk. β°statusβ this callsstatuson the proxiedPromises::Deferredinstance. a vibe check, essentially.resultβ this callsresulton the proxiedPromises::Deferredinstance. the receipts. πis_unfulfilledβ this callsis_unfulfilledon the proxiedPromises::Deferredinstance. it's givingβ¦ pending. πis_fulfilledβ this callsis_fulfilledon the proxiedPromises::Deferredinstance. we ate. πis_failedβ this callsis_failedon the proxiedPromises::Deferredinstance. it's not me, it's the promise. πis_in_progressβ this callsis_in_progresson the proxiedPromises::Deferredinstance. main character mid-arc.is_resolvedβ this callsis_resolvedon the proxiedPromises::Deferredinstance. healing era. πis_rejectedβ this callsis_rejectedon the proxiedPromises::Deferredinstance. left on read. πis_doneβ this callsis_doneon the proxiedPromises::Deferredinstance. and scene. π¬
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com> β thank you for your service, legend. π«‘
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2025, 2017, 2014, 2012 by Infinity Interactive, Inc. a whole timeline of copyright, we stan longevity. β
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, free as in freedom, free as in she-did-that. π¦
and that's the whole page, bestie! this wasPromises::Promise(3), delivered to you byperl v5.42.0, stamped2025-07-25. go forth and proxy responsibly. π β¨π
π¦ 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