X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=b7f57fd47492cba06f9bc25fa42d48484d3ae8df;hb=13985c0aedd0003d3a722c6a729ef19e998f891c;hp=e770f325fb97fd8ade0cbe9ecd6dbd4ec8af6260;hpb=a84683240a2c46b54f93e15b23b479f5f652f92f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index e770f32..b7f57fd 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -15,7 +15,7 @@ use utf8; use namespace::clean -except => 'meta'; -has env => (is => 'rw'); +has env => (is => 'rw', writer => '_set_env'); # input position and length has read_length => (is => 'rw'); @@ -93,6 +93,11 @@ sub finalize_cookies { -httponly => $val->{httponly} || 0, ) ); + if (!defined $cookie) { + $c->log->warn("undef passed in '$name' cookie value - not setting cookie") + if $c->debug; + next; + } push @cookies, $cookie->as_string; } @@ -727,7 +732,7 @@ not directly available via Catalyst objects $c->request, $c->engine ... BEWARE: If you really need to access some environment variable from your Catalyst application you should use $c->engine->env->{VARNAME} instead of $ENV{VARNAME}, -as in some enviroments the %ENV hash does not contain what you would expect. +as in some environments the %ENV hash does not contain what you would expect. =head1 AUTHORS