[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Help with Perl/CGI
>>>>> "Alex" == Alex Hudson <home [at] alexhudson.com> writes:
Alex> On Wed, Oct 23, 2002 at 03:52:26PM +0100, Steve Tickle
Alex> wrote:
>> #!/usr/bin/perl;
>>
>> my $input;
>>
>> $input = param('input');
Alex> Should be:
Alex> #!/usr/bin/perl -w
Alex> use strict;
Alex> use CGI;
Alex> use CGI::Carp qw(fatalsToBrowser);
But the general wisdom is to only
use CGI::Carp 'fatalsToBrowser';
in development.
You don't particularly want to tell all the script kiddies why your
script broke.
Ideally your script should be pretty robust, but if something does
happen, you want to make life as hard as possible for the kiddies.
I generally just die, and let Apache put up a nice 500 - Server error
page that looks reasonably presentable, rather than have the error
message on show.
Cheers.
Baz.
--
Barrie J. Bremner
baz-sheflug [at] barriebremner.com http://barriebremner.com/
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.