[dancer-users] D2 config.yml ignoring "port"

Warren Young wyml at etr-usa.com
Mon Aug 10 16:51:03 BST 2015


On Aug 8, 2015, at 5:32 AM, Russell Jenkins wrote:
> 
>  perl -E'use Dancer2; get "/" => sub { "Hello" }; dance’

How useful is that, really?  I mean, yes, it’s cute that you can do that, but who is actually depending on it, today?

Maybe this sort of usage should be a D1-only use, and D2 should get rid of the “port” setting entirely, as part of its move to letting plackup be in charge of things like HTTP.

If the real value in keeping the “port” setting is to make migration from D1 to D2 easier, why does Dancer2::Manual::Migration tell you to switch from dance() to to_app(), unconditionally?

> If you think the docs could be clearer about this, we'd really appreciate a doc patch!

If Dancer 2 jettisons this bit of Dancer 1 compatibility, you get clarity the best way: by removing unnecessary detail, rather than by adding more verbiage.

If plackup is in charge, the Daner2 docs can simply mention the port 5000 default, then refer to the Plack/PSGI/Starman docs for overrides.

This also gets rid of $ENV{DANCER_PORT}, “has port”, etc.


More information about the dancer-users mailing list