X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=1e56bdc89afe2d9145a6a655ccf93b4a7b999b30;hb=676bed72afa0c79b9f26e1d548a49dbfb6ea15c7;hp=84c75e9d3a27b1ffe45da3878560016d8f2d475d;hpb=3ed5a3fb2fbee3b3c89025071458597a6fb21992;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 84c75e9..1e56bdc 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -45,9 +45,12 @@ has _response_cb => ( predicate => '_has_response_cb', ); +subtype 'Catalyst::Engine::Types::Writer', + as duck_type([qw(write close)]); + has _writer => ( is => 'ro', - isa => duck_type([qw(write close)]), + isa => 'Catalyst::Engine::Types::Writer', writer => '_set_writer', clearer => '_clear_writer', ); @@ -128,6 +131,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; }