Yancy::Backend::Role::Sync - A role to give a synchronous backend useful Promises methods
package Yancy::Backend::SyncOnly; with 'Yancy::Backend::Role::Sync'; package main; my $be = Yancy::Backend::SyncOnly->new; my $promise = $be->create_p( \%item );
This role implements
create_p methods that return Mojo::Promise objects for synchronous backends. This does not make the backend asynchronous: The original, synchronous method is called and a promise object created from the result. The promise is then returned already fulfilled.
Doug Bell <email@example.com>
This software is copyright (c) 2020 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.