in reply to Re: Perl, Die, and IIS
in thread Perl, Die, and IIS
Don’t use stuff like my_die, which will not be respected by loaded modules. Don’t roll your own die handler.
Do use CGI::Carp. In development, the easiest thing to do is use CGI::Carp qw( fatalsToBrowser );. Once you are in production on an errorlog-challenged server, you do what the module’s POD says:
BEGIN { use CGI::Carp qw( carpout ); my $logfile = '/path/to/cgi-name.log'; open my $logfh, '>>', $logfile or die "Unable to open $logfile: $!\n"; carpout $logfh; }
Makeshifts last the longest.
|
|---|