perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: CGI::Carp and PerlRun
Date Thu, 09 Dec 2004 21:04:31 GMT
Brian Dimeler wrote:
> Hi,
>  I've noticed that on some of my simpler CGI scripts, in which I use 
> CGI::Carp's 'die' replacement to print an error message to the browser, 
> PerlRun will give an internal server error instead, but still log the 
> error message. These scripts worked fine under mod_cgi. CGI::Carp's 
> documentation claims to have long ago been patched to work with 
> mod_perl, 

I suppose it assumed mod_perl handlers, but may be not PerlRun.

> but for some reason this isn't working for me. Even a very 
> simple example:
> #!/usr/bin/perl -w
> use CGI::Carp 'fatalsToBrowser';
> die 'CGI::Carp test';
> will log this in error_log:
> [Thu Dec  9 10:54:27 2004] [error] PerlRun: `CGI::Carp test at 
> /System/Library/Perl/5.8.1/CGI/ line 312.
> yet generate a 500 error for the browser (access_log):
> [09/Dec/2004:10:54:27 -0500] "GET /cgi-bin/ HTTP/1.1" 500 605
> Does anyone know why this would happen under PerlRun, which is 
> *supposed* to be able to run CGI scripts without modification, and if 
> there's a workaround?

I've tested it and it works fine under Apache::Registry, but not 
Apache::PerlRun. (we are talking modperl1 here I assume). I suppose this 
is because it's run as chunk of code rather than a CODE reference. It's a problem. Ideally this module should rewritten.

FWIW, I've tested and ModPerl::PerlRun in modperl2 has no problem with it. 
So perhaps you could try to use modperl2 instead.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

Report problems:
Mail list info:
List etiquette:

View raw message