Be more elaborate on why D::Request::env() is helpful #971

isync opened this Issue Nov 8, 2013 · 1 comment

2 participants


Proposed issue label: "Documentation"

I ran into an issue where I was relying on the %ENV hash for some if/else stuff. From my CGI::App way of thinking, I was quietly assuming that %ENV would always be there - as it always was where I deployed under CGI and CGI::Fast.

Now, Dancer deploys .fcgi via Plack::Handler::FCGI. And although I'm not 100% sure this isn't a bug but wanted behaviour, under Plack::Handler::FCGI I ended up with a sparsely filled %ENV while all the expected vars for me were only accessible via request->env. Took me quite a while to figure that out and switch over to using Dancer's offered API. Could be it would've saved me half an hour of debugging if I had stumbled over it in the POD. So, for other users it might be helpful.

Without opening a pull-request, my proposed pod change is in:

@yanick yanick added a commit that closed this issue Dec 1, 2013
@yanick yanick Merge branch 'env-doc' into devel
Fixes #971
@yanick yanick closed this in 7be6f49 Dec 1, 2013

Good one. Merged. thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment