<div dir="ltr">Hi everyone,<div><br></div><div>yesterday we released the long-awaited version 0.150000 of Dancer2.</div><div><br></div><div><b>Codename LoonyPandora:</b></div><div><br></div><div>This release is dedicated to our colleague and friend James Aitken (otherwise known as LoonyPandora) who had recently passed away, having been struck by a vehicle.</div>

<div><br></div><div>James was a contributor to Dancer (both 1 and 2) since the early age of these projects. He provided insight, fixes, plugins, and was a crucial part of the community.</div><div><br></div><div>His many contributions have made Dancer better, but his personality, charm, and warmth are at the heart of our community. We are eternally grateful for the light we received with his presence, and we will remember him kindly.</div>

<div><br></div><div>Thank you, James, from all us.</div><div><br></div><div><b>Changes in this release:</b></div><div><br></div><div>It took us a while to release this version because it carries a few massive changes. These introduce some incompatibility (which we're trying to help with, and reduce using shims), but also solidifies the structure of the architecture.</div>

<div><br></div><div><b>* Context is removed:</b></div><div><b><br></b></div><div>The biggest change in this release is the untangling and removal of the context object of Dancer2: Dancer2::Core::Context.</div><div><br></div>

<div>Contexts are useful (providing all the... well, context of a request), but the way it was implemented in Dancer2 was tricky. It was complicated, global, had state that wasn't easily removed, existed in multiple places across the code, and not just a source of pain, but also a memory leak we had only fixed when removing it. We might introduce it back again, but this time we will be able to do it much better, if need be.</div>

<div><br></div><div>This change introduces a possible problem for other plugins. We will try to follow all the plugins available and help release new versions of these plugins in order to accommodate this change. Please bear with us.</div>

<div><br></div><div>We will also appreciate any help to get this done as soon as possible.</div><div><br></div><div><b>* App-specific PSGI application:</b><br></div><div><br></div><div>Another big change is the ability to create full-fledged PSGI apps from specific Dancer Apps, instead of all the available Dancer Apps. This is an important difference to understand.</div>

<div><br></div><div>When you call "start", "dance", or "Dancer2->psgi_app()", it will generate a PSGI app from all the available Dancer Apps. This means every App loaded ("use MyApp") will be part of the PSGI app we generate.</div>

<div><br></div><div>However, you can now create both PSGI apps from a single Dancer App, but also from multiple Dancer Apps - which can be defined by name or regular expression:</div><div><br></div><div># load three Dancer Apps in memory</div>

<div>use App1; use App2; use App3;</div><div><br></div><div># create a PSGI app from all of them</div><div>my $psgi = dance; # or start</div><div><br></div><div># create a PSGI app from App3 alone:</div><div>my $psgi = App3->psgi_app;</div>

<div><br></div><div># create a PSGI app from both App2 and App3:</div><div>my $psgi = Dancer2->psgi_app( [ 'App2', 'App3' ] );</div><div><br></div><div># create a PSGI app from both App1 and App2 using regular expressions:</div>

<div>my $psgi = Dancer2->psgi_app( [ qr/^App(1|2)$/ ] );</div><div><br></div><div>This feature allows you to preload every Dancer App, without forcing a PSGI app of all of them. This is exceptionally useful in a large environment with multiple apps loaded into memory providing separate PSGI apps used by the user.</div>

<div><br></div><div><b>* Major memory leaks fixed:</b></div><div><br></div><div>Thanks to the context untangling and additional work by Russell Jenkins, we have removed multiple memory leaks that have been annoying us for quite some time.</div>

<div><br></div><div><div><b>* App-specific configuration:</b></div><div><b><br></b></div><div>We can now define specific configurations using a separate configuration file for each Dancer App. This involved a lot of work of untangling the configuration role.</div>

<div><br></div><div>Take a look at t/config_multiapp.t test and the associated sample Dancer Apps as an example of how this works.</div></div><div><br></div><div><b>* Various fixes and improvements</b></div><div><b><br></b></div>

<div>We have also made some changes, closing additional 14 issues, and multiple fixes and enhancements which weren't covered in tickets.</div><div><br></div><div>The following people are responsible for this release (in alphabetical order):</div>

<div><div>Andrew Solomon, Andy Jack, Bas Bloemsaat, Chunzi, DavsX, Ivan Kocienski, Javier Rojas, Jean Stebens, Michał Wojciechowski, Mickey Nasriachi, Pedro Bruno, Russell Jenkins, Sawyer X, Stefan Hornburg, Steven Humphrey.</div>

</div><div><br></div><div>Way to go, everyone! :)</div></div>