From: Mika Raento Date: March 22 2007 8:52am Subject: exceptions and perl List-Archive: http://lists.mysql.com/ndb-connectors/17 Message-Id: <460243D0.2090500@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Using or not using exceptions in perl is (of course) a matter of taste. eval { } is the same as try { }. With DBI you choose whether you want return values or exceptions with the RaiseError option. My opinion? If we only use one mechanism, I'd strongly prefer exceptions over return values. You can do RAII in perl, if you want, so it all fits together quite nicely. If we feel we have enough time I would very much like to see a way to call functions that can be expected to fail with a parameter or a second name which indicates that I'd like a return value instead of an exception (a bit like open() in unix where you can say O_CREAT to create the file if it doesn't exist or leave it out if you actually care whether it existed or not). Mika