WebService::Fake - Fake a Web Service
This document describes WebService::Fake version 0.006.
use WebService::Fake;
This module is at the heart of the webservice script waf, although you can find the real documentation there.
waf
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.
WEBSERVICE_FAKE
webservice-fake.yml
$obj->startup;
Initialization method called by Mojolicious.
Report bugs through GitHub (patches welcome).
Foo::Bar.
Flavio Poletti <polettix@cpan.org>
Copyright (C) 2016 by Flavio Poletti <polettix@cpan.org>
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.
cpanm
cpanm WebService::Fake
CPAN shell
perl -MCPAN -e shell install WebService::Fake
For more information on module installation, please visit the detailed CPAN module installation guide.