PerlDancer/Dancer2 — pull request #471 by gideondsouza (2013-09-18 11:17:41+00:00)
Title: Pr/command line support

I've implemented command line options for `port`, `environment`, `confdir` and `daemon`. As per #391 we don't support auto reload in Dancer2. This also fixes #385

I've tested on OSX and CentOS. It works. **However**, there was a small design problem here. I could not import the `setting` method into `Dancer2.pm` or `GetOpt.pm`, I later learned probably this idea is wrong for Dancer2 and I might need to change the configs on the instance. (`$runner->config` or `$app->config`) I tried a whole lot of options and none of them worked.

More importantly `setting(port => 1234)` doesn't work from anywhere once the defaults have been loaded.

I finally just set the $ENV to the appropriate config and this works.

I'm open to refactoring this PR or making any more changes needed to implement this correctly, if this is not acceptable :smile: