Change sub fatal in Links.pm. Or if it's for a separate cgi script, add the line:
local $SIG{__DIE__} = \&MyModule::my_fatal;
and in MyModule.pm create a function my_fatal, modelled after Links::fatal.
EDIT: do you really want your script to die after this error, don't you want to just print out the error, and go on with the script, i.e. something like
my $error;
$table->insert($record) or $error = $GT::SQL::error;
if ($error) {
do something useful here ...
}
Ivan
-----
Iyengar Yoga Resources / GT Plugins
local $SIG{__DIE__} = \&MyModule::my_fatal;
and in MyModule.pm create a function my_fatal, modelled after Links::fatal.
EDIT: do you really want your script to die after this error, don't you want to just print out the error, and go on with the script, i.e. something like
my $error;
$table->insert($record) or $error = $GT::SQL::error;
if ($error) {
do something useful here ...
}
Ivan
-----
Iyengar Yoga Resources / GT Plugins