Dancer::Plugin::ExtDirect - ExtDirect plugin for Dancer
This accepts a route handler URI path, such as
/api. You can also use Dancer wildcards such as
/projects/*/api, so that the values caught are passed to your method handlers.
This option is injected to the addProvider method call.
This accepts a hashref with additional config options that will be injected to the addProvider method call.
This accepts a hashref whose keys are ExtDirect class names and their values are hashrefs with the method definitions (see the synopsis above for an example). Each method is defined by a hashref having the following keys:
The number of arguments that the exported function accepts.
A coderef (or reference to a subroutine) that will handle the request. Note that this module doesn't force you to map the exposed ExtDirect class to any particular Perl class layout. The handler subroutine will be called with the arguments coming from the client-side. If you used any wildcards in the
apipath, the values caught (with Dancer's
splatmethod) will be prepended to the arguments.
Optional. Mark this as true to handle ExtJs form (see ExtJs docs about the formHandler API).
Optional. Mark this as true to send ExtDirect exceptions when the handler dies. Default is false, meaning that Dancer will just throw a 500 Internal Server Error with no details exposed.
Alessandro Ranellucci <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Alessandro Ranellucci.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.