<div id="reply-content">
You should use dancer_version, not Dancer->VERSION.
</div><div id="reply-content"><br></div><div id="reply-content">For Dancer::Test, indeed it's not ideal, but changing Dancer 1 is not really possible. </div>
<div id="119759C2187542D89568A7C6630D6203"></div>
<p style="color: #A0A0A8;">Le vendredi 28 décembre 2012 à 16:17, Celogeek a écrit :</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<div id="quoted-message-content"><div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>I have fix this :<br></div><div><br></div><div>+use Dancer qw/:syntax/;<br>+BEGIN {<br>+ require Dancer::Test;<br>+ if (Dancer->VERSION ge '1.99') {<br>+ Dancer::Test->import('TestApp');<br>+ } else {<br>+ Dancer::Test->import();<br>+ }<br>+}</div><div><br></div><div>But it sucks.<br></div><div><br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Celogeek" <me@celogeek.com><br><b>À: </b>"Perl Dancer users mailing list" <dancer-users@dancer.pm><br><b>Envoyé: </b>Vendredi 28 Décembre 2012 16:05:32<br><b>Objet: </b>[dancer-users] Dancer::Test issues<br><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>I'm trying (hardly trying) to upgrade Dancer::Plugin::Redis.<br></div><div><br></div><div>And I face to multiple issues.<br></div><div><br></div><div>First, the test unit doesn't work like before. Which complicate the test.<br></div><div><br></div><div>For example :<br></div><div><br></div><div>use Dancer::Test;<br></div><div>use TestApp;<br></div><div><br></div><div>dancer_response 'GET' => '/' => lead to 404<br></div><div><br></div><div>but it was working in Dancer1.<br></div><div><br></div><div>So I need to do :<br></div><div><br></div><div>use TestApp;<br></div><div>use Dancer::Test 'TestApp';<br></div><div><br></div><div>dancer_response 'GET' => '/' => 200<br></div><div><br></div><div>But if I test this with Dancer1 I have a warning message :<br></div><div><br></div><div>Odd number of assignement in Dancer::Test ...<br></div><div><br></div><div>So the Dancer::Test is not backward compatible, and work differently.<br></div><div><br></div><div>How can I fix this ?<br></div><div><br></div></div><br>_______________________________________________<br>dancer-users mailing list<br>dancer-users@dancer.pm<br>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users<br></div><div><br></div></div><div>_______________________________________________</div><div>dancer-users mailing list</div><div>dancer-users@dancer.pm</div><div>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</div></div></div>
</blockquote>
<div>
<br>
</div>