One extra check befor using a new cookie-object

I got sometimes the following error, its not totally clear how to reproduce (hacker testing our service/faking cookies?), but the fix should handle it. CGI::Simple::Cookie can return undef, when name or value is not defined and then $cookie->as_string throws this error:


Caught exception in engine "Can't call method "as_string" on an undefined value at /home/websuche/perl5lib
/lib/site_perl/5.10.1/Catalyst/Engine.pm line 97.