<div dir="ltr">Wow... this a huge release... :)<div><br></div><div>Congratulations to all the team, really amazing stuff!</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 9:22 PM, Sawyer X <span dir="ltr"><<a href="mailto:xsawyerx@gmail.com" target="_blank">xsawyerx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The long awaited new version of <a href="https://metacpan.org/pod/Dancer2" target="_blank">Dancer2</a> is finally on its way to CPAN mirror near you!<br><br>Why did it take so long, what's changed, and why the big bump in version?<br><br>In short: A new plugin system, reworked from scratch, that is still (mostly) backwards compatible.<br><br><b>The plugin system<br></b><br>One of the sore points left in Dancer2 is its plugin architecture. The idea was to have an easy, comfortable plugin system (similar to Dancer 1) but much smarter. Unfortunately while the idea was there, and some of the code was there, the goals were not fully achieved, due to tuit shortage.<br><br>This led to various problems with plugins, most notably, using plugins within other plugins. This was beyond frustrating for several plugin developers. The current system was simply insufficient. We decided to finally tackle this. I have an entire story about that, but I'll leave it for another time.<br><br>The new plugin system provides each plugin with its own instance, full <a href="https://metacpan.org/pod/Moo" target="_blank">Moo</a> classes (use attributes, roles, other plugins, whatever you want), full access to the internal objects (which, as a plugin developer, you might as well use), and cleanly decouples it from the user namespace. Despite it being object oriented, we still carefully try and handle the old keyword-based interface that the previous plugin system used. In places where it was not possible, we contacted the module authors, and provided pull requests to implement the new parts. We even collected statistics on which modules are supported, whether we submitted a PR, whether it was merged, and whether a new release was made. You can see this <a href="https://github.com/PerlDancer/Dancer2/issues/1078" target="_blank">here</a>.<br><br>The compatibility layer was incredibly involved and tasking and took several good developers, and myself, to get it done. Damien Krotkine (dams) even came back from semi-retirement just to help remove AUTOLOAD usage. He was missed. :)<br><br>Peter Mottram has worked tirelessly to get everything running as smooth as possible. He tracked everything, debugged, tested, submitted PRs, contacted and worked with authors, and basically did the work of about 20 people at once.<br><br><b>New core plugin<br></b><br>A beautiful gem that was a result of the second Dancer Conference (<a href="http://perl.dance/" target="_blank">DancerConf</a>), <a href="https://metacpan.org/pod/Dancer2::Plugin::SendAs" target="_blank">Dancer2::Plugin::SendAs</a> is now in core! Most people do not know about it. It allows you to override the serializer (or the lack thereof) per response.<br><br>Well, that's not really true. The truth is that we introduced a stronger version of it with more features!<br><br><b>New keywords<br></b><br>The original keyword spec for <a href="https://metacpan.org/pod/Dancer" target="_blank">Dancer</a> and <a href="https://metacpan.org/pod/Dancer2" target="_blank">Dancer2</a> included header and push_header. This is only for response, not request. We now introduced variations explicitly for request and response, namely request_header and response_header (and more).<br><br><b>Megasplat fix<br></b><br>We fixed a problem with Megasplat, reported by Miyagawa-san.<br><br><b>Plack support<br></b><br>We support new <a href="https://metacpan.org/pod/Plack" target="_blank">Plack</a> versions, a breakage that we marked as a mandatory high-priority issue.<br><br><b>A bit faster<br></b><br>We've internally moved to <a href="https://metacpan.org/pod/Type::Tiny" target="_blank">Type::Tiny</a> which will automatically load <a href="https://metacpan.org/pod/Type::Tiny::XS" target="_blank">Type::Tiny::XS</a>, making your program faster.<br><br>We also moved from <a href="https://metacpan.org/pod/Class::Load" target="_blank">Class::Load</a> to <a href="https://metacpan.org/pod/Module::Refresh" target="_blank">Module::Runtime</a> to both reduce dependencies and speed up the framework.<br><br>There had been quite a few more improvements and we would like to thank everyone who helped make this release such a great one. You can view all the changes in the <a href="https://metacpan.org/changes/distribution/Dancer2" target="_blank">Changes</a> log.<br><br><b>Onwards<br></b><br>Now that we got the new plugin architecture out of the way, we can start concentrating on additional improvements and interesting changes. We will introduce a completely reworked documentation, named routes (or route aliases), and maybe a rainbow-colored pony which sneezes sunshine.<br><br>With much love, The Dancer Core Team.</div>
<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Pedro Melo<br>@pedromelo<br><a href="http://www.simplicidade.org/" target="_blank">http://www.simplicidade.org/</a><br><a href="mailto:xmpp%3Amelo@simplicidade.org" target="_blank">xmpp:melo@simplicidade.org</a><br>mailto:<a href="mailto:melo@simplicidade.org" target="_blank">melo@simplicidade.org</a></div>
</div>