NAME
Promise::ES6::Future - Translation to/from Future
DESCRIPTION
This module provides logic to convert between promises and Future instances.
FUNCTIONS
$promise = from_future( $FUTURE )
Returns a Promise:ES6 instance from the given $FUTURE. (If $FUTURE is not a Future instance, $FUTURE is returned.)
$future = to_future( $PROMISE )
Returns a Future instance from the given $PROMISE. (If $PROMISE is a Future instance, $PROMISE is returned.)
Note that this function can work with promise objects that aren’t Promise::ES6 instances. In fact, anything that isn’t a Future instance will cause this function to create a new Future.