[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] "Premature end of script headers" problem


At 11:16 AM 4/25/2003, Geraint Jones wrote:
> On Thu, 24 Apr 2003, Geraint Jones wrote:
> > I've just started experimenting with CGI::App. I've tried the first very > > simple example in the docs and all I get is "Premature end of script
> > headers". I've tried and tried to get it to work to no avail.

Here's the code I'm using - it's a modified version of the WidgetView example
in the docs.

Here's the Instance Script (inventory.cgi)

#!/usr/bin/perl -w

use Inventory;

my $webapp = Inventory->new();
$webapp->run();

and here's the Application Module (Inventory.pm):

#!/usr/bin/perl -w

package Inventory;
use base 'CGI::Application';
use strict;

try adding:
use CGI::Carp qw(fatalsToBrowser);
so that any die() or warn() calls will display a usable error page.

--
Greg Marr
suppressed


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.