-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, May 05, 2001 at 12:04:11PM -0400, Sterin, Ilya wrote:
> The problem with putting it into an eval block is that it will be commited
> no matter what and then your rollback statement is useless.  You should
> really check on status of execute to commit/rollback based on that.  Also
> with autocommit off is any of the statements fail though stopping the
> program, the inserts/updates would not of been commited.  In your case eval
> prevents from failing a script, though commiting no matter what.

Say what?!?

An eval block will exit at the point a die is triggered.  It traps a fatal and
then leaves the eval block without aborting the rest of the script.  But it
doesn't continue executing the eval block like you suggest.

There's even an example in `perldoc DBI` that looks exactly like the given
code.  What would be the point of it if it kept executing?  eval *traps* errors,
it doesn't completely disable them.

- -- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBOvR37gOGqGs0PadnEQKFjgCeIp5dWSKbi8yeowRKrie6b9dG8zgAoOv3
dJgg6PN6ZVLf+tdrDDF5b3o8
=BVYL
-----END PGP SIGNATURE-----

Reply via email to