in reply to 'Premature end of script headers' error
1. Running from the command line is more useful than running via your browser and the webserver
2. If the command line won't tell you what's wrong, the perl debugger will:perl -d yourscript.cgi (see the perldebug manpage for how it works).
3. Sometimes, you do need to run via a browser (to get environment variables etc. right) and then CGI::Carp has a useful function called fatalsToBrowser:
use CGI::Carp qw/fatalsToBrowser/;
will show you runtime errors in your browser. (Not sure if it'll do the same for compilation errors tho.)
Mmkay?
dave
|
|---|