Trouble with CGI::Carp

2003-03-14 Thread Gary McMeekin
I am trying to prevent generic crashes going to the browser in my
CGI program. I am using :

use CGI::Carp 'fatalsToBrowser';

and eventually I will use a set_message. However I have a
strange problem in that the following subroutine, if there are
errors on the statement execution, it does not send the error to
the browser. I can put my own 'die' in there and it works.

I am forced to use the 'eval' statement, as you can see on the
first SQL statement.

Would be grateful for any guidance.

Gary



sub add_record {

(code snipped here and there for brevity).

### Subject ###
if($add_subject) {
my $sql = errstr;
eval { $sth->execute  };
if ($@) { &failure($co); }
}

### From address ###
if($add_from_addr) {
my $sql = errstr;
$sth->execute or die (&failure($co));
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CGI::FormBuilder

2003-03-14 Thread Rob Benton
Is there a way to print a 'button' input type without a label next to it
using the FormBuilder object?  I can't find the right combination.

I always wind up with this

 +---+
Next |Next   |
 +---+

and what I want is

 +---+
 |Next   |
 +---+

$form->field(name => 'next', value => 'Next', label => 0)
is all I could think of to try but that doesn't work.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CGI::FormBuilder

2003-03-14 Thread Dennis Stout
Try this:

$form->submit( -name   =>  'Next',
 -value   =>  'Next',
),

Swap submit out for hte various types of buttons.  Reset, and what not.

Dennis

- Original Message - 
From: "Rob Benton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 11 47
Subject: CGI::FormBuilder


> Is there a way to print a 'button' input type without a label next to it
> using the FormBuilder object?  I can't find the right combination.
> 
> I always wind up with this
> 
>  +---+
> Next |Next   |
>  +---+
> 
> and what I want is
> 
>  +---+
>  |Next   |
>  +---+
> 
> $form->field(name => 'next', value => 'Next', label => 0)
> is all I could think of to try but that doesn't work.
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]