starman にPLACK_ENVを渡さないと、PLACK_ENV=depoymentになる

Qiitaに書いたものの転載

タイトルそのままです。

starman コマンドのデフォルトのPLACK_ENVはdepoyment になるようです。

久しぶりに触ったので小一時間悩んだ。。。

starman  -e 'sub { [q{200}, [ qw(Content-Type text/html) ], [ $ENV{PLACK_ENV} ] ];}'

curlで叩いてみる

$ curl http://localhost:5000
deployment

plackupから叩くと development になります。

plackup -s Starman  -e 'sub { [q{200}, [ qw(Content-Type text/html) ], [ $ENV{PLACK_ENV} ] ];}'
$ curl http://localhost:5000
development