perl-catalyst/catalyst-runtime — pull request #42 by laufeyjarson (2014-06-30 22:20:01+00:00)
Title: Adds support to Script/Server.pm for env variable to set host

This change allows a MYAPP_HOST or CATALYST_HOST environment variable to set the -h value for Server::Script, allowing it to be set as the port can be.

The only quirk is that the default value 'undef' isn't a valid Str type for Moose, and changing to Maybe[Str] confused MooseX::Getopt. A type definition of MaybeStr that maps to =s in MooseX::Getopt sorts that out. The other viable option would be to make the default an empty string instead of undef, but that seemed like more changes. The code never uses it as anything but a truth check, so it would work.

If that's preferable, I can rework it to that pretty easily. The tests will change more than the code.