[dancer-users] Dancer2 0.150000 - Codename LoonyPandora

sawyer x xsawyerx at gmail.com
Sun Aug 17 20:30:44 BST 2014

Hi everyone,

yesterday we released the long-awaited version 0.150000 of Dancer2.

*Codename LoonyPandora:*

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.

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.

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.

Thank you, James, from all us.

*Changes in this release:*

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

** Context is removed:*

The biggest change in this release is the untangling and removal of the
context object of Dancer2: Dancer2::Core::Context.

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.

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.

We will also appreciate any help to get this done as soon as possible.

** App-specific PSGI application:*

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.

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.

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

# load three Dancer Apps in memory
use App1; use App2; use App3;

# create a PSGI app from all of them
my $psgi = dance; # or start

# create a PSGI app from App3 alone:
my $psgi = App3->psgi_app;

# create a PSGI app from both App2 and App3:
my $psgi = Dancer2->psgi_app( [ 'App2', 'App3' ] );

# create a PSGI app from both App1 and App2 using regular expressions:
my $psgi = Dancer2->psgi_app( [ qr/^App(1|2)$/ ] );

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.

** Major memory leaks fixed:*

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.

** App-specific configuration:*

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.

Take a look at t/config_multiapp.t test and the associated sample Dancer
Apps as an example of how this works.

** Various fixes and improvements*

 We have also made some changes, closing additional 14 issues, and multiple
fixes and enhancements which weren't covered in tickets.

The following people are responsible for this release (in alphabetical
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.

Way to go, everyone! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20140817/c1de9b8c/attachment.html>

More information about the dancer-users mailing list