Skip to content

Instantly share code, notes, and snippets.

@tempire
Created June 10, 2020 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tempire/9c94a92e31ad3b8187a5bcbf5fb17a91 to your computer and use it in GitHub Desktop.
Save tempire/9c94a92e31ad3b8187a5bcbf5fb17a91 to your computer and use it in GitHub Desktop.
my $hashref;
method_that_returns_promise
->then(sub {
$hashref = shift;
return 1;
})
->then(sub {
my $thing = $hashref;
do_something_with($thing);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment