dams/Dancer-Plugin-FlashMessage — pull request #2 by sukria (2012-03-25 15:56:42+00:00)
Title: Support for Dancer2

These are the needed patches to make it pass against the last version of Dancer2 (master branch on GitHub).

Important note: it can't pass on Dancer 1 and Dancer 2 at the same time because of a change in the arguments passed to register coderefs in Dancer2 :

In Dancer 1 we did :

register something => sub {
my ($arg1, $arg2) = @_;
};

In Dancer 2 we have :

register something => sub {
my $dsl = shift;
my ($arg1, $arg2) = @_;
};

If we want the plugin to support both versions, we'll need to have some extra code to support both syntax.