Does anyone on this list know? ---------- Forwarded message ---------- On Sat, 18 Apr 2015, Russell Jenkins wrote:
Have you have a chance to look at either proposal?
I searched for this but did not find the proposals. Do you have any links?
Quick updates on the new plugins rearchitecture: Yanick Champoux and Russell Jenkins have both produces two different implementations that resolve our current problems in different ways. They are available online. We have an internal discussion about this which I hope to bring to the public mailing list to get comments from the general community. On Sun, Apr 19, 2015 at 9:56 AM, Henk van Oers <hvo.pm@xs4all.nl> wrote:
Does anyone on this list know?
---------- Forwarded message ----------
On Sat, 18 Apr 2015, Russell Jenkins wrote:
Have you have a chance to look at either proposal?
I searched for this but did not find the proposals.
Do you have any links?
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
On 2015-04-19 07:59 AM, Sawyer X wrote:
Yanick Champoux and Russell Jenkins have both produces two different implementations that resolve our current problems in different ways. They are available online.
Mine is at https://github.com/PerlDancer/Dancer2/compare/master...yanick:plugins-yanick And Russell's is at https://github.com/PerlDancer/Dancer2/compare/master...veryrusty:playground/... For additional giggles, here's the commentaries what went with the disclosure of that branch: Look first at poc/lib/Dancer2/Plugin/Foo.pm That's a plugin that use an inner plugin, and export one keyword (truncate_txt). The API is subject to change, but keywords are defined via sub keywords { @list_of_keywords } and the list of keywords are expected to be method for that plugin. Note that the plugin inherit the attributes 'app()' and 'config()'. Whatever thing this plugin wants to do to the app, it does in its `BUILD`. After, look at poc/lib/poc.pm That's the main app file. A plugin can be added via use Dancer2::Plugin::Foo ':app'; The ':app' there will cause the plugin to be auto-added to the app (via $app->with_plugins(...)) and have the keywords exported. If that's not desired (for example, in testing files), then just doing use Dancer2::Plugin::Foo; will do a regular, boring, non-exporting 'use' of the module. After that, you can look at lib/Dancer2/Plugin2, which does the export dance, and lib/Dancer2/Core/App, which has been augmented by the 'with_plugins' method. Joy, `/anick
On Mon, 20 Apr 2015, Yanick Champoux wrote:
On 2015-04-19 07:59 AM, Sawyer X wrote:
Yanick Champoux and Russell Jenkins have both produces two different implementations that resolve our current problems in different ways. They are available online.
Mine is at https://github.com/PerlDancer/Dancer2/compare/master...yanick:plugins-yanick
And Russell's is at https://github.com/PerlDancer/Dancer2/compare/master...veryrusty:playground/...
Thank you Yanick for the disclosure. I now know which I prefer. -- Henk
participants (3)
-
Henk van Oers -
Sawyer X -
Yanick Champoux