<div dir="ltr">Hey folks,<div><br></div><div>So I'm working on fixing issue #393:</div><div><a href="https://github.com/PerlDancer/Dancer2/issues/393">https://github.com/PerlDancer/Dancer2/issues/393</a><br></div><div>
<br></div><div>I'm sorry to have gotten jammed up with such a simple task. I ran into a small issue which might relate to other things going on.</div><div><br></div><div>(1) I cannot use setting(port => 1234) or setting(environment => "stage") inside GetOpt like Dancer1. It fails. </div>
<div>Here is the line that fails:</div><div><a href="https://github.com/gideondsouza/Dancer2/blob/pr/command_line_support/lib/Dancer2/GetOpt.pm#L15">https://github.com/gideondsouza/Dancer2/blob/pr/command_line_support/lib/Dancer2/GetOpt.pm#L15</a><br>
</div><div><br></div><div>@mst did point out this is incorrect, I should point to the config setting on the app instance. A larger problem here is that this doesn't work either.</div><div><br></div><div>(2) $app->setting(..) or $runner->setting(..) don't work. </div>
<div>See : <a href="https://github.com/gideondsouza/Dancer2/blob/pr/command_line_support/lib/Dancer2.pm#L151">https://github.com/gideondsouza/Dancer2/blob/pr/command_line_support/lib/Dancer2.pm#L151</a></div><div><br></div>
<div>What also perplexed me is that if I put a breakpoint at a line inside Dancer2::import it wouldn't stop and just go and run the server.</div><div><br></div><div>So what should I do here? Setting $ENV{} works. Should I do this? Am I doing something wrong? Is there anything else I should fix first?</div>
<div><br></div><div>Regards,</div><div>Gideon</div></div>