[dancer-users] Plugin globals, and sharing database connections between plugins

Andrew Beverley andy at andybev.com
Wed Feb 18 15:30:25 GMT 2015


On Tue, 2015-02-17 at 12:56 +0000, Andrew Beverley wrote:
> Hi guys,
> 
> There has been discussion over the last few weeks about the plugin
> architecture having problems, in terms of using one plugin's functions
> inside another's.
> 
> One area that this is particularly problematic is using a database
> plugin in another plugin, for example in an authentication module.
> 
> For the latter scenario (but probably not the former), I thought it
> might be useful if a plugin could register global data, that could be
> accessed by other plugins. This patch does exactly that:
> 
> https://github.com/ctrlo/Dancer2/commit/9383ade1e46691106e835cd9155976fa5247b541

This is what I did in the end:

https://github.com/racke/Dancer2-Plugin-Auth-Extensible/pull/7

As always, any comments welcome.

Andy




More information about the dancer-users mailing list