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

Reply via email to