Dancer2::Plugin::AppRole::Helper - helper functions for creating Dancer2 AppRole plugins
version 1.152121
In your plugin:
package Dancer2::Plugin::Mine; use Dancer2::Plugin; use Dancer2::Plugin::AppRole::Helper; # short version on_plugin_import { ensure_approle_s "Mine", @_ }; # OR long and/or customized version on_plugin_import { ensure_approle "Dancer2::Plugin::AppRole::Mine", @_ }; # ...
In your Dancer module:
package MyDancerApp; use Dancer2; use Dancer2::Plugin::Mine; # loads and applies the role to the app object use Dancer2::Plugin::Mine; # does *not* do it again use MyDancerSubModule;
In a submodule:
package MyDancerSubModule; use Dancer2 appname => 'MyDancerApp'; use Dancer2::Plugin::Mine; # does *not* do it again either, but would if # the submodule is loaded on its own
Apply the given role to the app in the given Dancer2 DSL object, but don't apply it twice.
Same as ensure_approle, but Dancer2::Plugin::AppRole:: is prepended on the role name for shorter calling.
Dancer2::Plugin::AppRole::
Please report any bugs or feature requests through the issue tracker at http://rt.cpan.org/Public/Dist/Display.html?Name=Dancer2-Plugin-AppRole-Helper. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/wchristian/Dancer2-Plugin-AppRole-Helper
git clone https://github.com/wchristian/Dancer2-Plugin-AppRole-Helper.git
Christian Walde <walde.christian@gmail.com>
Christian Walde has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.
Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.
To install Dancer2::Plugin::AppRole::Helper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Plugin::AppRole::Helper
CPAN shell
perl -MCPAN -e shell install Dancer2::Plugin::AppRole::Helper
For more information on module installation, please visit the detailed CPAN module installation guide.