Dancer2 prototype

I am very glad and proud to announce here that I’ve came up with a prototype of dancer2 that pleases me enough to be advertised.

The source code was hosted on a private Git repo (kudos to Sawyer) but I’ve now decided to push it on GitHub.

dancer2 is a complete rewrite of Dancer aiming at providing the same awesomeness with the following major changes:

  • no more globals in the core
  • 100% object-oriented backend (based on Moo)
  • better scoping for sub-applications
  • better design (no more encapsulation violations, Law of Demeter, …)

It’s not finished yet (dancer2 supports 80% of the Dancer’s DSL) but all the core is done. It’s well tested (around 80% of code coverage at this point) and I think the last 20% wont be hard to implement (session and serializer keywords mostly).

It’s able to run simple applications (it can run the
website for instance).

Of course, with your real-life applications, chances are that it will break in many places, this is where you can help. I’d like to have as many reports as possible regarding upgrades tests.

You can test very easily your app with dancer2:

  $ git clone
  $ cd YOUR_APP
  $ perl -I../dancer2/lib bin/

Also, important to know: most of the plugins may not be working well.

Here are the next steps:

  • Finish the DSL
  • Work on plugins backward compat
  • Write a “delta” POD (also list the deprecations)
  • Write a Dancer::BackwardCompat glue module for easier upgrades

8 thoughts on “Dancer2 prototype

  1. Great news! Will definitely have a test drive.

    However, just looking at the code, I have a question : am I supposed to have Dancer installed to run Dancer2? Looking at Dancer::Core::Hook, I see references to Dancer::Factory::Hook and Dancer::Hook::Properties packages that didn’t come with the git clone. Or simply is there some %INC black magic that I missed somewhere else?

    Anyway, congrats for the pre-release!


  2. Will it be possible to create more than one instance of an engine with dancer2? Like creating two TemplateToolkit engines with two configuration? In dancer, since its a singleton, its not possible


  3. @Phil in Dancer2 everything is scoped in the caller’s “namespace”. So if you have two package that use Dancer, they’ll have their own engine instances.


  4. @Jesús : Thanks, fixed! Actually the repo has been moved to our PerlDancer account on GitHub.


  5. Greetings sukriya, I checked my actual application with Dancer 2 and I got the following errors:

    1) using the plugin Dancer::Plugin::Auth::RBAC;
    perl -I ../Dancer2/lib bin/
    Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.10.1/Dancer/Plugin/Auth/ line 89.

    using the plugin Dancer::Plugin::SimpleCRUD;
    perl -I ../Dancer2/lib bin/
    Odd number of elements in hash assignment at /usr/local/share/perl/5.10.1/Dancer/Plugin/ line 225.

    I am searching the explanations because I could send more information.
    Thanks for your work.


Comments are closed.