System error

error:  Can't call method "as_string" on an undefined value at /opt/kb/html/Stuff/Ajax/Feedback line 32.
context: 
... 
28:  $data->{msg} = 'OK';
29: 
30:  # create cookie for 1 day
31:  my $cookie = CGI::Cookie->new(-name => $id, -value => 'answered', -expires => '+1d', -path => '/', -httponly => 1);
32:  $r->header_out('Set-Cookie', $cookie->as_string);
33: 
34:  $m->print(JSON->new->encode($data));
35: 
36:  </%init>
... 
code stack:  /opt/kb/html/Stuff/Ajax/Feedback:32
/opt/kb/html/autohandler:143
raw error






























Can't call method "as_string" on an undefined value at /opt/kb/html/Stuff/Ajax/Feedback line 32.


Trace begun at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "as_string" on an undefined value at /opt/kb/html/Stuff/Ajax/Feedback line 32.^J') called at /opt/kb/html/Stuff/Ajax/Feedback line 32
HTML::Mason::Commands::__ANON__('language', 'en', 'es_language', 'en') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55d139349a28)', 'language', 'en', 'es_language', 'en') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 1302
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'language', 'en', 'es_language', 'en') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::CGI=HASH(0x55d137f46ea0)', 'language', 'en', 'es_language', 'en') called at /opt/kb/html/autohandler line 143
HTML::Mason::Commands::__ANON__ at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55d136bc97a0)') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 1297
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 481
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 481
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::CGI=HASH(0x55d137f46ea0)') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/CGIHandler.pm line 179
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/CGIHandler.pm line 179
HTML::Mason::Request::CGI::exec('HTML::Mason::Request::CGI=HASH(0x55d137f46ea0)') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/Interp.pm line 342
HTML::Mason::Interp::exec(undef, undef) called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/CGIHandler.pm line 110
eval {...} at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/CGIHandler.pm line 110
HTML::Mason::CGIHandler::_handler('HTML::Mason::CGIHandler=HASH(0x55d136b69ba8)', 'HASH(0x55d1396ad888)') called at /opt/perl/perls/perl-5.14.4/lib/site_perl/5.14.4/HTML/Mason/CGIHandler.pm line 62
HTML::Mason::CGIHandler::handle_cgi_object('HTML::Mason::CGIHandler=HASH(0x55d136b69ba8)', 'CGI::Fast=HASH(0x55d138d2a118)') called at /opt/kb/bin/handler.pl line 111
KB::ProcessMasonRequest('HTML::Mason::CGIHandler=HASH(0x55d136b69ba8)', 'CGI::Fast=HASH(0x55d138d2a118)') called at /opt/kb/bin/kb.pl line 153
eval {...} at /opt/kb/bin/kb.pl line 153