You can make them object oriented if you want, or not, "Mc Bain" won't care, it's unobtrusive like that. FUNCTIONS The following functions are exported: provide( $method, $route, %opts ) Define a method and a route.
APIs are hierarchical, and every module in the API can be used as a complete API all by itself, detached from its siblings, so you can actually load only the parts of the API you need. $method is one of "GET", "POST", "PUT" or "DELETE".
forward( $namespace, [ \%params ] ) For usage from within API methods; this simply calls a method of the the API with the provided parameters (if any) and returns the result.
The PSGI and Gearman:: XS runners, however, are both JSON-in JSON-out interfaces.
A "Mc Bain" API is built of one or more topics, in a hierarchical structure.
is_root( ) Returns a true value if the module is the root topic of the API.
Mostly used internally and in Mc Bain runner modules.