Yancy::Backend::Role::Sync - A role to give a synchronous backend useful Promises methods
version 1.006
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 list_p, get_p, set_p, delete_p, and 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.
list_p
get_p
set_p
delete_p
create_p
If you have an asynchronous backend and want to allow users to use the synchronous API without implementing the methods yourself, see Yancy::Backend::Role::Sync.
Yancy::Backend, Yancy::Backend::Role::Async
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2018 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.
To install Yancy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yancy
CPAN shell
perl -MCPAN -e shell install Yancy
For more information on module installation, please visit the detailed CPAN module installation guide.