On Mon, 20 May 2002 10:15:02 +0100 (BST) Matt Sergeant <[EMAIL PROTECTED]> wrote:
: > my $um = UserManager->new; : > # ... : > try { : > $um->write_user($user); : > $um->dbh->commit; : > } catch Exception::DB with { : > my $e = shift; : > debug "Exception: $e"; : > $um->dbh->rollback; : > }; : : No. $um is caught in a closure, which could potentially leak. Wow, thank you, I have that pattern repeated in the code many times. That is the way I would write that try/catch in Java, where you need to have $um in the scope of the try and the catch blocks, what is the right way to write that in Perl/Error.pm? -- fxn