SuikaWiki::Output::CGICarp --- SuikaWiki : CGI::Carp modification to return 500 status code


At the time of writing, latest version of CGI::Carp (1.27) does not output error dying message with 500 (Internal Server Error) HTTP status code unless it is working on mod_perl.

This module overrides some of CGI::Carp functions to return 500 status code. Users of this module should take attention whether later revision of CGI::Carp provides improved version of CGI outputing methods.

This module is part of SuikaWiki.


$SuikaWiki::Output::CGICarp::CUSTOM_REASON_TEXT (Default : Internal CGI Script Error)

Short description of error status. This string should contains only printable ASCII characters (including SPACE) for interoperability and line break characters (CR and LF) MUST NOT be used.

$SuikaWiki::Output::CGICarp::CUSTOM_STATUS_CODE (Default : 500)

Three digit status code defined by HTTP specifications.


  use CGI::Carp qw/fatalsToBrowser/;
  require SuikaWiki::Output::CGICarp;
  die 'Something wrong';


Copyright 2003-2004 Wakaba <>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.