Hello, a suggestion:
Wrap your calls in 'load_tmpl( )' and then do my $ht = $self->load_tmpl(...) or my_error_handling_routine(...); Use the eval call in load_tmpl( ) to determine if you return false or true. Just the way I would do it ... Sincerely, Cory Trese Lead Web Application Developer O'NEIL & ASSOCIATES, INC. 495 Byers Rd. Miamisburg, Ohio 45342-3662 Phone: (937) 865-0846 ext. 3038 Fax: (937) 865-5858 E-mail: [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chisel Wright Sent: Friday, June 27, 2003 5:51 AM To: HTML::Template List Subject: Re: [htmltmpl] catch the carp::croak() death... On Fri, Jun 27, 2003 at 04:52:23AM -0400, Chris Reinhardt wrote: > eval { ...code that dies... }; > if ($@) { > # There was an error in the eval {} > } I've always been uncomfortable using eval(). I know /how/ to use it, but it just feels dirty. What are the negative effects (if any) of using eval()? I'm curious why the call to H::T->new() has to die, and not just return undef.. I'd love to be able to do something along the lines of: my $ht = HTML::Template->new(...) or my_error_handling_routine(...); instead of: eval ( $ht = HTML::Template->new(...); ); Chisel -- e: [EMAIL PROTECTED] | They asked how many employees we had, w: www.herlpacker.co.uk | broken down by sex. Told them drugs gpg: D167E7FE | and alcohol was more of a problem. ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users
