Promises::Promise(3)

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

πŸ’– 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 the Promises::Deferred module. so if you're confused, that's where you go. not here. here is the trailer, Promises::Deferred is 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 of Promises::Deferred that you want this object to proxy. one. singular. just the one bestie. 🌸
  • then( $callback, $error ) β€” this calls then on the proxied Promises::Deferred instance. go girl, do your thing. πŸ”₯
  • chain( @thens ) β€” this calls chain on the proxied Promises::Deferred instance. a whole list of thens?? obsessed. ✨
  • catch( $error ) β€” this calls catch on the proxied Promises::Deferred instance. catching feelings (and errors). 😭
  • done( $callback, $error ) β€” this calls done on the proxied Promises::Deferred instance. and that's on periodt.
  • finally( $callback ) β€” this calls finally on the proxied Promises::Deferred instance. closure, literally and figuratively. 🧚
  • timeout( $seconds ) β€” this calls timeout on the proxied Promises::Deferred instance. no texting back after that many seconds, iykyk. ⏰
  • status β€” this calls status on the proxied Promises::Deferred instance. a vibe check, essentially.
  • result β€” this calls result on the proxied Promises::Deferred instance. the receipts. πŸ’œ
  • is_unfulfilled β€” this calls is_unfulfilled on the proxied Promises::Deferred instance. it's giving… pending. πŸ™ˆ
  • is_fulfilled β€” this calls is_fulfilled on the proxied Promises::Deferred instance. we ate. πŸ“
  • is_failed β€” this calls is_failed on the proxied Promises::Deferred instance. it's not me, it's the promise. πŸ’€
  • is_in_progress β€” this calls is_in_progress on the proxied Promises::Deferred instance. main character mid-arc.
  • is_resolved β€” this calls is_resolved on the proxied Promises::Deferred instance. healing era. 🌈
  • is_rejected β€” this calls is_rejected on the proxied Promises::Deferred instance. left on read. πŸ’”
  • is_done β€” this calls is_done on the proxied Promises::Deferred instance. and scene. 🎬

πŸ’œ 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. 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 was Promises::Promise(3), delivered to you by perl v5.42.0, stamped 2025-07-25. go forth and proxy responsibly. πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from