Mojo::Promise::Role::Any - Fulfill when all of the promises are rejected
use Mojo::Promise; my $none_promise = Mojo::Promise ->with_roles( '+None' ) ->none( @promises );
Make a new promise that fulfills when all promises are rejected, and rejects otherwise.
- none( @promises )
Takes a lists of promises (or thenables) and returns another promise that fulfills when all of the promises are rejected.
If none of the promises reject, the none promise rejects. If all of the promises resolve then this is rejected.
If you pass no promises, the none promise fulfills.
This source is in Github:
brian d foy,
Copyright © 2018-2021, brian d foy, All Rights Reserved.
You may redistribute this under the terms of the Artistic License 2.0.