WebService::Fake - Fake a Web Service
This document describes WebService::Fake version 0.006.
This module is at the heart of the webservice script waf, although you can find the real documentation there.
my $sub_ref = $obj->body_expander($spec, $config);
Generate a sub reference that can be called to generate a body response. The actual body generated is then subject to pass through the sub reference generated by "body_wrapper".
my $sub_ref = $obj->body_wrapper($spec, $config);
Generate a wrapper to be applied when generating the body for a response. This allows you to factor all your response boilerplate for the body into one single place.
my $sub_ref = $obj->callback($spec, $config);
Generate a callback function to be installed as a route.
my $sub_ref = $obj->headers_expander($spec, $config);
Generate a wrapper to eventually generate headers for a response.
my $config = $obj->load_config;
Load the configuration file, which is whatever is pointed by environment variable WEBSERVICE_FAKE or by default file webservice-fake.yml in the current directory. Returns the loaded configuration.
Initialization method called by Mojolicious.
Report bugs through GitHub (patches welcome).
Flavio Poletti <firstname.lastname@example.org>
Copyright (C) 2016 by Flavio Poletti <email@example.com>
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
To install WebService::Fake, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.