in reply to First Perl CGI app; desirous of peer review.

About the DBI error handling: When you create the database handle, you can specify RaiseError => 1 as an option. This will do all the dying for you (i.e. you can remove all those die statements you have).
my $dbh = DBI->connect("DBI:mysql:database", "user", "password", { Rai +seError => 1 });
See the DBI manpage for more information.

ar0n ]

Replies are listed 'Best First'.
Re: (ar0n) Re: First Perl CGI app; desirous of peer review.
by legLess (Hermit) on Jun 24, 2001 at 22:06 UTC
    Thank you; that's good info, and it'll save me some typing.

    I'm still hoping to do something a little more elegant with the errors, like display a generic "Opps, the database barfed, try again or come back later" page and send myself an email.
    --
    man with no legs, inc.