PerlDancer/Dancer2 — pull request #36 by dams (2012-03-14 00:39:50+00:00)
Title: first implementation of plugin compatibility

First Basic implementation of the idea I had :

- as of Dancer 2, register_plugin takes an optional parameter 'for_versions' that indicates which major version of Dancer this plugin supports.
- this parameters defaults to for_versions => [ 1 ] so that plugins written up to now defaults to supporting only Dancer 1.
- at some point we'll change the code of Dancer 1 to check this parameter as well, and die if a plugin registers itself but supports only Dancer 2.

That way, when we release Dancer2, it will work only with plugins that declare that they are Dancer 2 compatible. If authors don't update their plugins, they will work only with Dancer 1.

I hope that was clear enough :)

Feel free to comment, especially the syntax could be better I guess