System error

error:  Can't call method "err_headers_out" on an undefined value at /usr/lib/perl5/Apache2/Cookie.pm line 83.
context: 
... 
79:  }
80: 
81:  sub bake {
82:  my ($c, $r) = @_;
83:  $r->err_headers_out->add("Set-Cookie", $c->as_string);
84:  }
85: 
86:  sub bake2 {
87:  my ($c, $r) = @_;
... 
code stack:  /usr/lib/perl5/Apache2/Cookie.pm:83
/var/www/piperka/autohandler:836
raw error






























Can't call method "err_headers_out" on an undefined value at /usr/lib/perl5/Apache2/Cookie.pm line 83.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "err_headers_out" on an undefined value at /usr/lib/perl5/Apache2/Cookie.pm line 83.^J') called at /usr/lib/perl5/Apache2/Cookie.pm line 83
Apache2::Cookie::bake('Apache2::Cookie=SCALAR(0x911c4b0)') called at /var/www/piperka/autohandler line 836
HTML::Mason::Commands::__ANON__('subscribe', 3021) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x9499688)', 'subscribe', 3021) called at /usr/share/perl5/HTML/Mason/Request.pm line 1273
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1268
HTML::Mason::Request::comp(undef, undef, undef, 'subscribe', 3021) called at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 419
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x8e2afc0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x8e2afc0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x84aea20)', 'Apache2::RequestRec=SCALAR(0x969a7a0)') called at (eval 31) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x969a7a0)') called at -e line 0
eval {...} at -e line 0