[dancer-users] Re : Dancer::Test issues
Celogeek
me at celogeek.com
Fri Dec 28 17:28:28 GMT 2012
The goal is to release Dancer::Plugin::Redis that work with Dancer1 and Dancer2.
So until Dancer2 is out, it is still working.
Of course it should be really more easy is Dancer2 was out, and so we can directly depends on it !
And only do one uniq new code with Dancer 2 as a deps. More simple, and faster.
----- Mail original -----
De: "Damien Krotkine" <dkrotkine at gmail.com>
À: "Perl Dancer users mailing list" <dancer-users at dancer.pm>
Envoyé: Vendredi 28 Décembre 2012 17:55:10
Objet: [dancer-users] Re : Dancer::Test issues
You should use dancer_version, not Dancer->VERSION.
For Dancer::Test, indeed it's not ideal, but changing Dancer 1 is not really possible.
Le vendredi 28 décembre 2012 à 16:17, Celogeek a écrit :
I have fix this :
+use Dancer qw/:syntax/;
+BEGIN {
+ require Dancer::Test;
+ if (Dancer->VERSION ge '1.99') {
+ Dancer::Test->import('TestApp');
+ } else {
+ Dancer::Test->import();
+ }
+}
But it sucks.
----- Mail original -----
De: "Celogeek" <me at celogeek.com>
À: "Perl Dancer users mailing list" <dancer-users at dancer.pm>
Envoyé: Vendredi 28 Décembre 2012 16:05:32
Objet: [dancer-users] Dancer::Test issues
I'm trying (hardly trying) to upgrade Dancer::Plugin::Redis.
And I face to multiple issues.
First, the test unit doesn't work like before. Which complicate the test.
For example :
use Dancer::Test;
use TestApp;
dancer_response 'GET' => '/' => lead to 404
but it was working in Dancer1.
So I need to do :
use TestApp;
use Dancer::Test 'TestApp';
dancer_response 'GET' => '/' => 200
But if I test this with Dancer1 I have a warning message :
Odd number of assignement in Dancer::Test ...
So the Dancer::Test is not backward compatible, and work differently.
How can I fix this ?
_______________________________________________
dancer-users mailing list
dancer-users at dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________
dancer-users mailing list
dancer-users at dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________
dancer-users mailing list
dancer-users at dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20121228/35105dc5/attachment.htm>
More information about the dancer-users
mailing list