CGI::Carp
2011-08-18 20:46
369 查看
use CGI::Carp;
BEGIN {
use CGI::Carp qw(carpout);
open(my $log, ">>", "cgi-logs/mycgi-log")
or die("Unable to open mycgi-log: $!\n");
carpout($log);
}
We can also make our errors go to a separate log, by using the carpout subroutine. This needs to be
done inside a BEGIN block in order to catch compiler errors as well as ones which occur at the
interpretation stage.
BEGIN {
use CGI::Carp qw(carpout);
open(my $log, ">>", "cgi-logs/mycgi-log")
or die("Unable to open mycgi-log: $!\n");
carpout($log);
}
We can also make our errors go to a separate log, by using the carpout subroutine. This needs to be
done inside a BEGIN block in order to catch compiler errors as well as ones which occur at the
interpretation stage.
相关文章推荐
- Nginx + CGI/FastCGI + C/Cpp
- C语言CGI上传文件
- 嵌入式CGI开发之旅——7
- Apache配置实现cgi
- 使用shell脚本编写cgi
- 在基于Jetty Fast CGI Proxy和php-fpm下配置Discuz
- 关于ISAPI和CGI限制,这个要设为允许
- 在mac os下的Apache服务器的cgi中运行python
- Ubuntu 14.02下编译及配置apache2.4(python CGI)
- Win7的IIS配置asp.net出现“由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面。”(图文解决方法)
- web框架之cgi.FieldStorage()与数据提交
- ajax+cgi+boa+ntcip
- U盘PE装系统-CGI一键还原备份安装方法
- 概念:CGI,FastCGI,PHP-CGI与PHP-FPM
- API和CGI区别
- [Python 2.7] Hello World CGI HTTP Server
- PHP安装模式cgi、fastcgi、php_mod比较
- Java Servlet与Applet、CGI、JSP的比较
- Python CGI编程和CGIHTTPServer
- python CGI 文件读写注意 500